Arrow: Better dates & times for Python

Release v0.14.5. (Installation)

Build Status Codecov PyPI Version Supported Python Versions License Code Style: Black

Arrow is a Python library that offers a sensible and human-friendly approach to creating, manipulating, formatting and converting dates, times and timestamps. It implements and updates the datetime type, plugging gaps in functionality and providing an intelligent module API that supports many common creation scenarios. Simply put, it helps you work with dates and times with fewer imports and a lot less code.

Arrow is named after the arrow of time and is heavily inspired by moment.js and requests.

Why use Arrow over built-in modules?

Python’s standard library and some other low-level modules have near-complete date, time and timezone functionality, but don’t work very well from a usability perspective:

  • Too many modules: datetime, time, calendar, dateutil, pytz and more

  • Too many types: date, time, datetime, tzinfo, timedelta, relativedelta, etc.

  • Timezones and timestamp conversions are verbose and unpleasant

  • Timezone naivety is the norm

  • Gaps in functionality: ISO-8601 parsing, timespans, humanization

Features

  • Fully-implemented, drop-in replacement for datetime

  • Supports Python 2.7, 3.5, 3.6, 3.7 and 3.8

  • Timezone-aware and UTC by default

  • Provides super-simple creation options for many common input scenarios

  • shift method with support for relative offsets, including weeks

  • Formats and parses strings automatically

  • Wide support for ISO-8601

  • Timezone conversion

  • Timestamp available as a property

  • Generates time spans, ranges, floors and ceilings for time frames ranging from microsecond to year

  • Humanizes and supports a growing list of contributed locales

  • Extensible for your own Arrow-derived types

Quick Start

Installation

To install Arrow, use pip or pipenv:

$ pip install -U arrow

Example Usage

>>> import arrow
>>> arrow.get('2013-05-11T21:23:58.970460+07:00')
<Arrow [2013-05-11T21:23:58.970460+07:00]>

>>> utc = arrow.utcnow()
>>> utc
<Arrow [2013-05-11T21:23:58.970460+00:00]>

>>> utc = utc.shift(hours=-1)
>>> utc
<Arrow [2013-05-11T20:23:58.970460+00:00]>

>>> local = utc.to('US/Pacific')
>>> local
<Arrow [2013-05-11T13:23:58.970460-07:00]>

>>> local.timestamp
1368303838

>>> local.format()
'2013-05-11 13:23:58 -07:00'

>>> local.format('YYYY-MM-DD HH:mm:ss ZZ')
'2013-05-11 13:23:58 -07:00'

>>> local.humanize()
'an hour ago'

>>> local.humanize(locale='ko_kr')
'1시간 전'

User’s Guide

Creation

Get ‘now’ easily:

>>> arrow.utcnow()
<Arrow [2013-05-07T04:20:39.369271+00:00]>

>>> arrow.now()
<Arrow [2013-05-06T21:20:40.841085-07:00]>

>>> arrow.now('US/Pacific')
<Arrow [2013-05-06T21:20:44.761511-07:00]>

Create from timestamps (ints or floats, or strings that convert to a float):

>>> arrow.get(1367900664)
<Arrow [2013-05-07T04:24:24+00:00]>

>>> arrow.get('1367900664')
<Arrow [2013-05-07T04:24:24+00:00]>

>>> arrow.get(1367900664.152325)
<Arrow [2013-05-07T04:24:24.152325+00:00]>

>>> arrow.get('1367900664.152325')
<Arrow [2013-05-07T04:24:24.152325+00:00]>

Use a naive or timezone-aware datetime, or flexibly specify a timezone:

>>> arrow.get(datetime.utcnow())
<Arrow [2013-05-07T04:24:24.152325+00:00]>

>>> arrow.get(datetime(2013, 5, 5), 'US/Pacific')
<Arrow [2013-05-05T00:00:00-07:00]>

>>> from dateutil import tz
>>> arrow.get(datetime(2013, 5, 5), tz.gettz('US/Pacific'))
<Arrow [2013-05-05T00:00:00-07:00]>

>>> arrow.get(datetime.now(tz.gettz('US/Pacific')))
<Arrow [2013-05-06T21:24:49.552236-07:00]>

Parse from a string:

>>> arrow.get('2013-05-05 12:30:45', 'YYYY-MM-DD HH:mm:ss')
<Arrow [2013-05-05T12:30:45+00:00]>

Search a date in a string:

>>> arrow.get('June was born in May 1980', 'MMMM YYYY')
<Arrow [1980-05-01T00:00:00+00:00]>

Some ISO-8601 compliant strings are recognized and parsed without a format string:

>>> arrow.get('2013-09-30T15:34:00.000-07:00')
<Arrow [2013-09-30T15:34:00-07:00]>

Arrow objects can be instantiated directly too, with the same arguments as a datetime:

>>> arrow.get(2013, 5, 5)
<Arrow [2013-05-05T00:00:00+00:00]>

>>> arrow.Arrow(2013, 5, 5)
<Arrow [2013-05-05T00:00:00+00:00]>

Properties

Get a datetime or timestamp representation:

>>> a = arrow.utcnow()
>>> a.datetime
datetime.datetime(2013, 5, 7, 4, 38, 15, 447644, tzinfo=tzutc())

>>> a.timestamp
1367901495

Get a naive datetime, and tzinfo:

>>> a.naive
datetime.datetime(2013, 5, 7, 4, 38, 15, 447644)

>>> a.tzinfo
tzutc()

Get any datetime value:

>>> a.year
2013

Call datetime functions that return properties:

>>> a.date()
datetime.date(2013, 5, 7)

>>> a.time()
datetime.time(4, 38, 15, 447644)

Replace & Shift

Get a new Arrow object, with altered attributes, just as you would with a datetime:

>>> arw = arrow.utcnow()
>>> arw
<Arrow [2013-05-12T03:29:35.334214+00:00]>

>>> arw.replace(hour=4, minute=40)
<Arrow [2013-05-12T04:40:35.334214+00:00]>

Or, get one with attributes shifted forward or backward:

>>> arw.shift(weeks=+3)
<Arrow [2013-06-02T03:29:35.334214+00:00]>

Even replace the timezone without altering other attributes:

>>> arw.replace(tzinfo='US/Pacific')
<Arrow [2013-05-12T03:29:35.334214-07:00]>

Format

>>> arrow.utcnow().format('YYYY-MM-DD HH:mm:ss ZZ')
'2013-05-07 05:23:16 -00:00'

Convert

Convert to timezones by name or tzinfo:

>>> utc = arrow.utcnow()
>>> utc
<Arrow [2013-05-07T05:24:11.823627+00:00]>

>>> utc.to('US/Pacific')
<Arrow [2013-05-06T22:24:11.823627-07:00]>

>>> utc.to(tz.gettz('US/Pacific'))
<Arrow [2013-05-06T22:24:11.823627-07:00]>

Or using shorthand:

>>> utc.to('local')
<Arrow [2013-05-06T22:24:11.823627-07:00]>

>>> utc.to('local').to('utc')
<Arrow [2013-05-07T05:24:11.823627+00:00]>

Humanize

Humanize relative to now:

>>> past = arrow.utcnow().shift(hours=-1)
>>> past.humanize()
'an hour ago'

Or another Arrow, or datetime:

>>> present = arrow.utcnow()
>>> future = present.shift(hours=2)
>>> future.humanize(present)
'in 2 hours'

Support for a growing number of locales (see locales.py for supported languages):

>>> future = arrow.utcnow().shift(hours=1)
>>> future.humanize(a, locale='ru')
'через 2 час(а,ов)'

Ranges & Spans

Get the time span of any unit:

>>> arrow.utcnow().span('hour')
(<Arrow [2013-05-07T05:00:00+00:00]>, <Arrow [2013-05-07T05:59:59.999999+00:00]>)

Or just get the floor and ceiling:

>>> arrow.utcnow().floor('hour')
<Arrow [2013-05-07T05:00:00+00:00]>

>>> arrow.utcnow().ceil('hour')
<Arrow [2013-05-07T05:59:59.999999+00:00]>

You can also get a range of time spans:

>>> start = datetime(2013, 5, 5, 12, 30)
>>> end = datetime(2013, 5, 5, 17, 15)
>>> for r in arrow.Arrow.span_range('hour', start, end):
...     print r
...
(<Arrow [2013-05-05T12:00:00+00:00]>, <Arrow [2013-05-05T12:59:59.999999+00:00]>)
(<Arrow [2013-05-05T13:00:00+00:00]>, <Arrow [2013-05-05T13:59:59.999999+00:00]>)
(<Arrow [2013-05-05T14:00:00+00:00]>, <Arrow [2013-05-05T14:59:59.999999+00:00]>)
(<Arrow [2013-05-05T15:00:00+00:00]>, <Arrow [2013-05-05T15:59:59.999999+00:00]>)
(<Arrow [2013-05-05T16:00:00+00:00]>, <Arrow [2013-05-05T16:59:59.999999+00:00]>)

Or just iterate over a range of time:

>>> start = datetime(2013, 5, 5, 12, 30)
>>> end = datetime(2013, 5, 5, 17, 15)
>>> for r in arrow.Arrow.range('hour', start, end):
...     print repr(r)
...
<Arrow [2013-05-05T12:30:00+00:00]>
<Arrow [2013-05-05T13:30:00+00:00]>
<Arrow [2013-05-05T14:30:00+00:00]>
<Arrow [2013-05-05T15:30:00+00:00]>
<Arrow [2013-05-05T16:30:00+00:00]>

Factories

Use factories to harness Arrow’s module API for a custom Arrow-derived type. First, derive your type:

>>> class CustomArrow(arrow.Arrow):
...
...     def days_till_xmas(self):
...
...         xmas = arrow.Arrow(self.year, 12, 25)
...
...         if self > xmas:
...             xmas = xmas.shift(years=1)
...
...         return (xmas - self).days

Then get and use a factory for it:

>>> factory = arrow.ArrowFactory(CustomArrow)
>>> custom = factory.utcnow()
>>> custom
>>> <CustomArrow [2013-05-27T23:35:35.533160+00:00]>

>>> custom.days_till_xmas()
>>> 211

Supported Tokens

Use the following tokens in parsing and formatting. Note that they’re not the same as the tokens for strptime(3):

Token

Output

Year

YYYY

2000, 2001, 2002 … 2012, 2013

YY

00, 01, 02 … 12, 13

Month

MMMM

January, February, March … 1

MMM

Jan, Feb, Mar … 1

MM

01, 02, 03 … 11, 12

M

1, 2, 3 … 11, 12

Day of Year

DDDD 5

001, 002, 003 … 364, 365

DDD 5

1, 2, 3 … 4, 5

Day of Month

DD

01, 02, 03 … 30, 31

D

1, 2, 3 … 30, 31

Do

1st, 2nd, 3rd … 30th, 31st

Day of Week

dddd

Monday, Tuesday, Wednesday … 2

ddd

Mon, Tue, Wed … 2

d

1, 2, 3 … 6, 7

Hour

HH

00, 01, 02 … 23, 24

H

0, 1, 2 … 23, 24

hh

01, 02, 03 … 11, 12

h

1, 2, 3 … 11, 12

AM / PM

A

AM, PM, am, pm 1

a

am, pm 1

Minute

mm

00, 01, 02 … 58, 59

m

0, 1, 2 … 58, 59

Second

ss

00, 01, 02 … 58, 59

s

0, 1, 2 … 58, 59

Sub-second

S…

0, 02, 003, 000006, 123123123123… 3

Timezone

ZZZ

Asia/Baku, Europe/Warsaw, GMT … 4

ZZ

-07:00, -06:00 … +06:00, +07:00

Z

-0700, -0600 … +0600, +0700

Timestamp

X

1381685817

Footnotes

1(1,2,3,4)

localization support for parsing and formatting

2(1,2)

localization support only for formatting

3

the result is truncated to microseconds, with half-to-even rounding.

4

timezone names from tz database provided via dateutil package

5(1,2)

support for the DDD and DDDD tokens will be added in a future release

Escaping Formats

Tokens, phrases, and regular expressions in a format string can be escaped when parsing by enclosing them within square brackets.

Tokens & Phrases

Any token or phrase can be escaped as follows:

>>> fmt = "YYYY-MM-DD h [h] m"
>>> arrow.get("2018-03-09 8 h 40", fmt)
<Arrow [2018-03-09T08:40:00+00:00]>

>>> fmt = "YYYY-MM-DD h [hello] m"
>>> arrow.get("2018-03-09 8 hello 40", fmt)
<Arrow [2018-03-09T08:40:00+00:00]>

>>> fmt = "YYYY-MM-DD h [hello world] m"
>>> arrow.get("2018-03-09 8 hello world 40", fmt)
<Arrow [2018-03-09T08:40:00+00:00]>

This can be useful for parsing dates in different locales such as French, in which it is common to format time strings as “8 h 40” rather than “8:40”.

Regular Expressions

You can also escape regular expressions by enclosing them within square brackets. In the following example, we are using the regular expression \s+ to match any number of whitespace characters that separate the tokens. This is useful if you do not know the number of spaces between tokens ahead of time (e.g. in log files).

>>> fmt = r"ddd[\s+]MMM[\s+]DD[\s+]HH:mm:ss[\s+]YYYY"
>>> arrow.get("Mon Sep 08 16:41:45 2014", fmt)
<Arrow [2014-09-08T16:41:45+00:00]>

>>> arrow.get("Mon \tSep 08   16:41:45     2014", fmt)
<Arrow [2014-09-08T16:41:45+00:00]>

>>> arrow.get("Mon Sep 08   16:41:45   2014", fmt)
<Arrow [2014-09-08T16:41:45+00:00]>

API Guide

arrow.arrow

Provides the Arrow class, an enhanced datetime replacement.

class arrow.arrow.Arrow(year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None)

An Arrow object.

Implements the datetime interface, behaving as an aware datetime while implementing additional functionality.

Parameters
  • year – the calendar year.

  • month – the calendar month.

  • day – the calendar day.

  • hour – (optional) the hour. Defaults to 0.

  • minute – (optional) the minute, Defaults to 0.

  • second – (optional) the second, Defaults to 0.

  • microsecond – (optional) the microsecond. Defaults 0.

  • tzinfo – (optional) A timezone expression. Defaults to UTC.

Recognized timezone expressions:

  • A tzinfo object.

  • A str describing a timezone, similar to ‘US/Pacific’, or ‘Europe/Berlin’.

  • A str in ISO-8601 style, as in ‘+07:00’.

  • A str, one of the following: ‘local’, ‘utc’, ‘UTC’.

Usage:

>>> import arrow
>>> arrow.Arrow(2013, 5, 5, 12, 30, 45)
<Arrow [2013-05-05T12:30:45+00:00]>
astimezone(tz)

Returns a datetime object, converted to the specified timezone.

Parameters

tz – a tzinfo object.

Usage:

>>> pacific=arrow.now('US/Pacific')
>>> nyc=arrow.now('America/New_York').tzinfo
>>> pacific.astimezone(nyc)
datetime.datetime(2019, 1, 20, 10, 24, 22, 328172, tzinfo=tzfile('/usr/share/zoneinfo/America/New_York'))
ceil(frame)

Returns a new Arrow object, representing the “ceiling” of the timespan of the Arrow object in a given timeframe. Equivalent to the second element in the 2-tuple returned by span.

Parameters

frame – the timeframe. Can be any datetime property (day, hour, minute…).

Usage:

>>> arrow.utcnow().ceil('hour')
<Arrow [2013-05-09T03:59:59.999999+00:00]>
clone()

Returns a new Arrow object, cloned from the current one.

Usage:

>>> arw = arrow.utcnow()
>>> cloned = arw.clone()
ctime()

Returns a ctime formatted representation of the date and time.

Usage:

>>> arrow.utcnow().ctime()
'Sat Jan 19 18:26:50 2019'
date()

Returns a date object with the same year, month and day.

Usage:

>>> arrow.utcnow().date()
datetime.date(2019, 1, 23)
property datetime

Returns a datetime representation of the Arrow object.

Usage:

>>> arw=arrow.utcnow()
>>> arw.datetime
datetime.datetime(2019, 1, 24, 16, 35, 27, 276649, tzinfo=tzutc())
dst()

Returns the daylight savings time adjustment.

Usage:

>>> arrow.utcnow().dst()
datetime.timedelta(0)
property float_timestamp

Returns a floating-point representation of the Arrow object, in UTC time.

Usage:

>>> arrow.utcnow().float_timestamp
1548260516.830896
floor(frame)

Returns a new Arrow object, representing the “floor” of the timespan of the Arrow object in a given timeframe. Equivalent to the first element in the 2-tuple returned by span.

Parameters

frame – the timeframe. Can be any datetime property (day, hour, minute…).

Usage:

>>> arrow.utcnow().floor('hour')
<Arrow [2013-05-09T03:00:00+00:00]>
for_json()

Serializes for the for_json protocol of simplejson.

Usage:

>>> arrow.utcnow().for_json()
'2019-01-19T18:25:36.760079+00:00'
format(fmt='YYYY-MM-DD HH:mm:ssZZ', locale='en_us')

Returns a string representation of the Arrow object, formatted according to a format string.

Parameters

fmt – the format string.

Usage:

>>> arrow.utcnow().format('YYYY-MM-DD HH:mm:ss ZZ')
'2013-05-09 03:56:47 -00:00'

>>> arrow.utcnow().format('X')
'1368071882'

>>> arrow.utcnow().format('MMMM DD, YYYY')
'May 09, 2013'

>>> arrow.utcnow().format()
'2013-05-09 03:56:47 -00:00'
classmethod fromdate(date, tzinfo=None)

Constructs an Arrow object from a date and optional replacement timezone. Time values are set to 0.

Parameters
classmethod fromdatetime(dt, tzinfo=None)

Constructs an Arrow object from a datetime and optional replacement timezone.

Parameters
  • dt – the datetime

  • tzinfo – (optional) A timezone expression. Defaults to dt’s timezone, or UTC if naive.

If you only want to replace the timezone of naive datetimes:

>>> dt
datetime.datetime(2013, 5, 5, 0, 0, tzinfo=tzutc())
>>> arrow.Arrow.fromdatetime(dt, dt.tzinfo or 'US/Pacific')
<Arrow [2013-05-05T00:00:00+00:00]>
classmethod fromtimestamp(timestamp, tzinfo=None)

Constructs an Arrow object from a timestamp, converted to the given timezone.

Parameters
  • timestamp – an int or float timestamp, or a str that converts to either.

  • tzinfo – (optional) a tzinfo object. Defaults to local time.

Timestamps should always be UTC. If you have a non-UTC timestamp:

>>> arrow.Arrow.utcfromtimestamp(1367900664).replace(tzinfo='US/Pacific')
<Arrow [2013-05-07T04:24:24-07:00]>
humanize(other=None, locale='en_us', only_distance=False, granularity='auto')

Returns a localized, humanized representation of a relative difference in time.

Parameters
  • other – (optional) an Arrow or datetime object. Defaults to now in the current Arrow object’s timezone.

  • locale – (optional) a str specifying a locale. Defaults to ‘en_us’.

  • only_distance – (optional) returns only time difference eg: “11 seconds” without “in” or “ago” part.

  • granularity – (optional) defines the precision of the output. Set it to strings ‘second’, ‘minute’, ‘hour’, ‘day’, ‘week’, ‘month’ or ‘year’.

Usage:

>>> earlier = arrow.utcnow().shift(hours=-2)
>>> earlier.humanize()
'2 hours ago'

>>> later = earlier.shift(hours=4)
>>> later.humanize(earlier)
'in 4 hours'
classmethod interval(frame, start, end, interval=1, tz=None)

Returns an iterator of tuples, each Arrow objects, representing a series of intervals between two inputs.

Parameters
  • frame – The timeframe. Can be any datetime property (day, hour, minute…).

  • start – A datetime expression, the start of the range.

  • end – (optional) A datetime expression, the end of the range.

  • interval – (optional) Time interval for the given time frame.

  • tz – (optional) A timezone expression. Defaults to UTC.

Supported frame values: year, quarter, month, week, day, hour, minute, second

Recognized datetime expressions:

  • An Arrow object.

  • A datetime object.

Recognized timezone expressions:

  • A tzinfo object.

  • A str describing a timezone, similar to ‘US/Pacific’, or ‘Europe/Berlin’.

  • A str in ISO-8601 style, as in ‘+07:00’.

  • A str, one of the following: ‘local’, ‘utc’, ‘UTC’.

Usage:

>>> start = datetime(2013, 5, 5, 12, 30)
>>> end = datetime(2013, 5, 5, 17, 15)
>>> for r in arrow.Arrow.interval('hour', start, end, 2):
...     print r
...
(<Arrow [2013-05-05T12:00:00+00:00]>, <Arrow [2013-05-05T13:59:59.999999+00:00]>)
(<Arrow [2013-05-05T14:00:00+00:00]>, <Arrow [2013-05-05T15:59:59.999999+00:00]>)
(<Arrow [2013-05-05T16:00:00+00:00]>, <Arrow [2013-05-05T17:59:59.999999+00:0]>)
is_between(start, end, bounds='()')

Returns a boolean denoting whether the specified date and time is between the start and end dates and times.

Parameters
  • start – an Arrow object.

  • end – an Arrow object.

  • bounds – (optional) a str of either ‘()’, ‘(]’, ‘[)’, or ‘[]’ that specifies whether to include or exclude the start and end values in the range. ‘(‘ excludes the start, ‘[‘ includes the start, ‘)’ excludes the end, and ‘]’ includes the end. If the bounds are not specified, the default bound ‘()’ is used.

Usage:

>>> start = arrow.get(datetime(2013, 5, 5, 12, 30, 10))
>>> end = arrow.get(datetime(2013, 5, 5, 12, 30, 36))
>>> arrow.get(datetime(2013, 5, 5, 12, 30, 27)).is_between(start, end)
True

>>> start = arrow.get(datetime(2013, 5, 5))
>>> end = arrow.get(datetime(2013, 5, 8))
>>> arrow.get(datetime(2013, 5, 8)).is_between(start, end, '[]')
True

>>> start = arrow.get(datetime(2013, 5, 5))
>>> end = arrow.get(datetime(2013, 5, 8))
>>> arrow.get(datetime(2013, 5, 8)).is_between(start, end, '[)')
False
isocalendar()

Returns a 3-tuple, (ISO year, ISO week number, ISO weekday).

Usage:

>>> arrow.utcnow().isocalendar()
(2019, 3, 6)
isoformat(sep='T')

Returns an ISO 8601 formatted representation of the date and time.

Usage:

>>> arrow.utcnow().isoformat()
'2019-01-19T18:30:52.442118+00:00'
isoweekday()

Returns the ISO day of the week as an integer (1-7).

Usage:

>>> arrow.utcnow().isoweekday()
6
property naive

Returns a naive datetime representation of the Arrow object.

Usage:

>>> nairobi = arrow.now('Africa/Nairobi')
>>> nairobi
<Arrow [2019-01-23T19:27:12.297999+03:00]>
>>> nairobi.naive
datetime.datetime(2019, 1, 23, 19, 27, 12, 297999)
classmethod now(tzinfo=None)

Constructs an Arrow object, representing “now” in the given timezone.

Parameters

tzinfo – (optional) a tzinfo object. Defaults to local time.

Usage:

>>> arrow.now('Asia/Baku')
<Arrow [2019-01-24T20:26:31.146412+04:00]>
classmethod range(frame, start, end=None, tz=None, limit=None)

Returns an iterator of Arrow objects, representing points in time between two inputs.

Parameters
  • frame – The timeframe. Can be any datetime property (day, hour, minute…).

  • start – A datetime expression, the start of the range.

  • end – (optional) A datetime expression, the end of the range.

  • tz – (optional) A timezone expression. Defaults to start’s timezone, or UTC if start is naive.

  • limit – (optional) A maximum number of tuples to return.

NOTE: The end or limit must be provided. Call with end alone to return the entire range. Call with limit alone to return a maximum # of results from the start. Call with both to cap a range at a maximum # of results.

NOTE: tz internally replaces the timezones of both start and end before iterating. As such, either call with naive objects and tz, or aware objects from the same timezone and no tz.

Supported frame values: year, quarter, month, week, day, hour, minute, second.

Recognized datetime expressions:

  • An Arrow object.

  • A datetime object.

Usage:

>>> start = datetime(2013, 5, 5, 12, 30)
>>> end = datetime(2013, 5, 5, 17, 15)
>>> for r in arrow.Arrow.range('hour', start, end):
...     print(repr(r))
...
<Arrow [2013-05-05T12:30:00+00:00]>
<Arrow [2013-05-05T13:30:00+00:00]>
<Arrow [2013-05-05T14:30:00+00:00]>
<Arrow [2013-05-05T15:30:00+00:00]>
<Arrow [2013-05-05T16:30:00+00:00]>

NOTE: Unlike Python’s range, end may be included in the returned iterator:

>>> start = datetime(2013, 5, 5, 12, 30)
>>> end = datetime(2013, 5, 5, 13, 30)
>>> for r in arrow.Arrow.range('hour', start, end):
...     print(repr(r))
...
<Arrow [2013-05-05T12:30:00+00:00]>
<Arrow [2013-05-05T13:30:00+00:00]>
replace(**kwargs)

Returns a new Arrow object with attributes updated according to inputs.

Use property names to set their value absolutely:

>>> import arrow
>>> arw = arrow.utcnow()
>>> arw
<Arrow [2013-05-11T22:27:34.787885+00:00]>
>>> arw.replace(year=2014, month=6)
<Arrow [2014-06-11T22:27:34.787885+00:00]>

You can also replace the timezone without conversion, using a timezone expression:

>>> arw.replace(tzinfo=tz.tzlocal())
<Arrow [2013-05-11T22:27:34.787885-07:00]>
shift(**kwargs)

Returns a new Arrow object with attributes updated according to inputs.

Use pluralized property names to shift their current value relatively:

>>> import arrow
>>> arw = arrow.utcnow()
>>> arw
<Arrow [2013-05-11T22:27:34.787885+00:00]>
>>> arw.shift(years=1, months=-1)
<Arrow [2014-04-11T22:27:34.787885+00:00]>

Day-of-the-week relative shifting can use either Python’s weekday numbers (Monday = 0, Tuesday = 1 .. Sunday = 6) or using dateutil.relativedelta’s day instances (MO, TU .. SU). When using weekday numbers, the returned date will always be greater than or equal to the starting date.

Using the above code (which is a Saturday) and asking it to shift to Saturday:

>>> arw.shift(weekday=5)
<Arrow [2013-05-11T22:27:34.787885+00:00]>

While asking for a Monday:

>>> arw.shift(weekday=0)
<Arrow [2013-05-13T22:27:34.787885+00:00]>
span(frame, count=1)

Returns two new Arrow objects, representing the timespan of the Arrow object in a given timeframe.

Parameters
  • frame – the timeframe. Can be any datetime property (day, hour, minute…).

  • count – (optional) the number of frames to span.

Supported frame values: year, quarter, month, week, day, hour, minute, second.

Usage:

>>> arrow.utcnow()
<Arrow [2013-05-09T03:32:36.186203+00:00]>

>>> arrow.utcnow().span('hour')
(<Arrow [2013-05-09T03:00:00+00:00]>, <Arrow [2013-05-09T03:59:59.999999+00:00]>)

>>> arrow.utcnow().span('day')
(<Arrow [2013-05-09T00:00:00+00:00]>, <Arrow [2013-05-09T23:59:59.999999+00:00]>)

>>> arrow.utcnow().span('day', count=2)
(<Arrow [2013-05-09T00:00:00+00:00]>, <Arrow [2013-05-10T23:59:59.999999+00:00]>)
classmethod span_range(frame, start, end, tz=None, limit=None)

Returns an iterator of tuples, each Arrow objects, representing a series of timespans between two inputs.

Parameters
  • frame – The timeframe. Can be any datetime property (day, hour, minute…).

  • start – A datetime expression, the start of the range.

  • end – (optional) A datetime expression, the end of the range.

  • tz – (optional) A timezone expression. Defaults to start’s timezone, or UTC if start is naive.

  • limit – (optional) A maximum number of tuples to return.

NOTE: The end or limit must be provided. Call with end alone to return the entire range. Call with limit alone to return a maximum # of results from the start. Call with both to cap a range at a maximum # of results.

NOTE: tz internally replaces the timezones of both start and end before iterating. As such, either call with naive objects and tz, or aware objects from the same timezone and no tz.

Supported frame values: year, quarter, month, week, day, hour, minute, second.

Recognized datetime expressions:

  • An Arrow object.

  • A datetime object.

NOTE: Unlike Python’s range, end will always be included in the returned iterator of timespans.

Usage:

>>> start = datetime(2013, 5, 5, 12, 30)
>>> end = datetime(2013, 5, 5, 17, 15)
>>> for r in arrow.Arrow.span_range('hour', start, end):
...     print(r)
...
(<Arrow [2013-05-05T12:00:00+00:00]>, <Arrow [2013-05-05T12:59:59.999999+00:00]>)
(<Arrow [2013-05-05T13:00:00+00:00]>, <Arrow [2013-05-05T13:59:59.999999+00:00]>)
(<Arrow [2013-05-05T14:00:00+00:00]>, <Arrow [2013-05-05T14:59:59.999999+00:00]>)
(<Arrow [2013-05-05T15:00:00+00:00]>, <Arrow [2013-05-05T15:59:59.999999+00:00]>)
(<Arrow [2013-05-05T16:00:00+00:00]>, <Arrow [2013-05-05T16:59:59.999999+00:00]>)
(<Arrow [2013-05-05T17:00:00+00:00]>, <Arrow [2013-05-05T17:59:59.999999+00:00]>)
strftime(format)

Formats in the style of datetime.strftime.

Parameters

format – the format string.

Usage:

>>> arrow.utcnow().strftime('%d-%m-%Y %H:%M:%S')
'23-01-2019 12:28:17'
classmethod strptime(date_str, fmt, tzinfo=None)

Constructs an Arrow object from a date string and format, in the style of datetime.strptime. Optionally replaces the parsed timezone.

Parameters
  • date_str – the date string.

  • fmt – the format string.

  • tzinfo – (optional) A timezone expression. Defaults to the parsed timezone if fmt contains a timezone directive, otherwise UTC.

Usage:

>>> arrow.Arrow.strptime('20-01-2019 15:49:10', '%d-%m-%Y %H:%M:%S')
<Arrow [2019-01-20T15:49:10+00:00]>
time()

Returns a time object with the same hour, minute, second, microsecond.

Usage:

>>> arrow.utcnow().time()
datetime.time(12, 15, 34, 68352)
property timestamp

Returns a timestamp representation of the Arrow object, in UTC time.

Usage:

>>> arrow.utcnow().timestamp
1548260567
timetuple()

Returns a time.struct_time, in the current timezone.

Usage:

>>> arrow.utcnow().timetuple()
time.struct_time(tm_year=2019, tm_mon=1, tm_mday=20, tm_hour=15, tm_min=17, tm_sec=8, tm_wday=6, tm_yday=20, tm_isdst=0)
timetz()

Returns a time object with the same hour, minute, second, microsecond and tzinfo.

Usage:

>>> arrow.utcnow().timetz()
datetime.time(12, 5, 18, 298893, tzinfo=tzutc())
to(tz)

Returns a new Arrow object, converted to the target timezone.

Parameters

tz – A timezone expression.

Usage:

>>> utc = arrow.utcnow()
>>> utc
<Arrow [2013-05-09T03:49:12.311072+00:00]>

>>> utc.to('US/Pacific')
<Arrow [2013-05-08T20:49:12.311072-07:00]>

>>> utc.to(tz.tzlocal())
<Arrow [2013-05-08T20:49:12.311072-07:00]>

>>> utc.to('-07:00')
<Arrow [2013-05-08T20:49:12.311072-07:00]>

>>> utc.to('local')
<Arrow [2013-05-08T20:49:12.311072-07:00]>

>>> utc.to('local').to('utc')
<Arrow [2013-05-09T03:49:12.311072+00:00]>
toordinal()

Returns the proleptic Gregorian ordinal of the date.

Usage:

>>> arrow.utcnow().toordinal()
737078
property tzinfo

Gets the tzinfo of the Arrow object.

Usage:

>>> arw=arrow.utcnow()
>>> arw.tzinfo
tzutc()
classmethod utcfromtimestamp(timestamp)

Constructs an Arrow object from a timestamp, in UTC time.

Parameters

timestamp – an int or float timestamp, or a str that converts to either.

classmethod utcnow()

Constructs an Arrow object, representing “now” in UTC time.

Usage:

>>> arrow.utcnow()
<Arrow [2019-01-24T16:31:40.651108+00:00]>
utcoffset()

Returns a timedelta object representing the whole number of minutes difference from UTC time.

Usage:

>>> arrow.now('US/Pacific').utcoffset()
datetime.timedelta(-1, 57600)
utctimetuple()

Returns a time.struct_time, in UTC time.

Usage:

>>> arrow.utcnow().utctimetuple()
time.struct_time(tm_year=2019, tm_mon=1, tm_mday=19, tm_hour=21, tm_min=41, tm_sec=7, tm_wday=5, tm_yday=19, tm_isdst=0)
weekday()

Returns the day of the week as an integer (0-6).

Usage:

>>> arrow.utcnow().weekday()
5

arrow.factory

Implements the ArrowFactory class, providing factory methods for common Arrow construction scenarios.

class arrow.factory.ArrowFactory(type=<class 'arrow.arrow.Arrow'>)

A factory for generating Arrow objects.

Parameters

type – (optional) the Arrow-based class to construct from. Defaults to Arrow.

get(*args, **kwargs)

Returns an Arrow object based on flexible inputs.

Parameters
  • locale – (optional) a str specifying a locale for the parser. Defaults to ‘en_us’.

  • tzinfo – (optional) a timezone expression or tzinfo object. Replaces the timezone unless using an input form that is explicitly UTC or specifies the timezone in a positional argument. Defaults to UTC.

Usage:

>>> import arrow

No inputs to get current UTC time:

>>> arrow.get()
<Arrow [2013-05-08T05:51:43.316458+00:00]>

None to also get current UTC time:

>>> arrow.get(None)
<Arrow [2013-05-08T05:51:49.016458+00:00]>

One Arrow object, to get a copy.

>>> arw = arrow.utcnow()
>>> arrow.get(arw)
<Arrow [2013-10-23T15:21:54.354846+00:00]>

One str, float, or int, convertible to a floating-point timestamp, to get that timestamp in UTC:

>>> arrow.get(1367992474.293378)
<Arrow [2013-05-08T05:54:34.293378+00:00]>

>>> arrow.get(1367992474)
<Arrow [2013-05-08T05:54:34+00:00]>

>>> arrow.get('1367992474.293378')
<Arrow [2013-05-08T05:54:34.293378+00:00]>

>>> arrow.get('1367992474')
<Arrow [2013-05-08T05:54:34+00:00]>

One ISO-8601-formatted str, to parse it:

>>> arrow.get('2013-09-29T01:26:43.830580')
<Arrow [2013-09-29T01:26:43.830580+00:00]>

One tzinfo, to get the current time converted to that timezone:

>>> arrow.get(tz.tzlocal())
<Arrow [2013-05-07T22:57:28.484717-07:00]>

One naive datetime, to get that datetime in UTC:

>>> arrow.get(datetime(2013, 5, 5))
<Arrow [2013-05-05T00:00:00+00:00]>

One aware datetime, to get that datetime:

>>> arrow.get(datetime(2013, 5, 5, tzinfo=tz.tzlocal()))
<Arrow [2013-05-05T00:00:00-07:00]>

One naive date, to get that date in UTC:

>>> arrow.get(date(2013, 5, 5))
<Arrow [2013-05-05T00:00:00+00:00]>

Two arguments, a naive or aware datetime, and a replacement timezone expression:

>>> arrow.get(datetime(2013, 5, 5), 'US/Pacific')
<Arrow [2013-05-05T00:00:00-07:00]>

Two arguments, a naive date, and a replacement timezone expression:

>>> arrow.get(date(2013, 5, 5), 'US/Pacific')
<Arrow [2013-05-05T00:00:00-07:00]>

Two arguments, both str, to parse the first according to the format of the second:

>>> arrow.get('2013-05-05 12:30:45 America/Chicago', 'YYYY-MM-DD HH:mm:ss ZZZ')
<Arrow [2013-05-05T12:30:45-05:00]>

Two arguments, first a str to parse and second a list of formats to try:

>>> arrow.get('2013-05-05 12:30:45', ['MM/DD/YYYY', 'YYYY-MM-DD HH:mm:ss'])
<Arrow [2013-05-05T12:30:45+00:00]>

Three or more arguments, as for the constructor of a datetime:

>>> arrow.get(2013, 5, 5, 12, 30, 45)
<Arrow [2013-05-05T12:30:45+00:00]>

One time.struct time:

>>> arrow.get(gmtime(0))
<Arrow [1970-01-01T00:00:00+00:00]>
now(tz=None)

Returns an Arrow object, representing “now” in the given timezone.

Parameters

tz – (optional) A timezone expression. Defaults to local time.

Usage:

>>> import arrow
>>> arrow.now()
<Arrow [2013-05-07T22:19:11.363410-07:00]>

>>> arrow.now('US/Pacific')
<Arrow [2013-05-07T22:19:15.251821-07:00]>

>>> arrow.now('+02:00')
<Arrow [2013-05-08T07:19:25.618646+02:00]>

>>> arrow.now('local')
<Arrow [2013-05-07T22:19:39.130059-07:00]>
utcnow()

Returns an Arrow object, representing “now” in UTC time.

Usage:

>>> import arrow
>>> arrow.utcnow()
<Arrow [2013-05-08T05:19:07.018993+00:00]>
exception arrow.factory.ArrowParseWarning

Raised when arrow.get() is passed a string with no formats and matches incorrectly on one of the default formats.

e.g. arrow.get(‘blabla2016’) -> <Arrow [2016-01-01T00:00:00+00:00]> arrow.get(‘13/4/2045’) -> <Arrow [2045-01-01T00:00:00+00:00]>

In version 0.15.0 this warning will become a ParserError.

arrow.api

Provides the default implementation of ArrowFactory methods for use as a module API.

arrow.api.get(*args, **kwargs)

Returns an Arrow object based on flexible inputs.

Parameters
  • locale – (optional) a str specifying a locale for the parser. Defaults to ‘en_us’.

  • tzinfo – (optional) a timezone expression or tzinfo object. Replaces the timezone unless using an input form that is explicitly UTC or specifies the timezone in a positional argument. Defaults to UTC.

Usage:

>>> import arrow

No inputs to get current UTC time:

>>> arrow.get()
<Arrow [2013-05-08T05:51:43.316458+00:00]>

None to also get current UTC time:

>>> arrow.get(None)
<Arrow [2013-05-08T05:51:49.016458+00:00]>

One Arrow object, to get a copy.

>>> arw = arrow.utcnow()
>>> arrow.get(arw)
<Arrow [2013-10-23T15:21:54.354846+00:00]>

One str, float, or int, convertible to a floating-point timestamp, to get that timestamp in UTC:

>>> arrow.get(1367992474.293378)
<Arrow [2013-05-08T05:54:34.293378+00:00]>

>>> arrow.get(1367992474)
<Arrow [2013-05-08T05:54:34+00:00]>

>>> arrow.get('1367992474.293378')
<Arrow [2013-05-08T05:54:34.293378+00:00]>

>>> arrow.get('1367992474')
<Arrow [2013-05-08T05:54:34+00:00]>

One ISO-8601-formatted str, to parse it:

>>> arrow.get('2013-09-29T01:26:43.830580')
<Arrow [2013-09-29T01:26:43.830580+00:00]>

One tzinfo, to get the current time converted to that timezone:

>>> arrow.get(tz.tzlocal())
<Arrow [2013-05-07T22:57:28.484717-07:00]>

One naive datetime, to get that datetime in UTC:

>>> arrow.get(datetime(2013, 5, 5))
<Arrow [2013-05-05T00:00:00+00:00]>

One aware datetime, to get that datetime:

>>> arrow.get(datetime(2013, 5, 5, tzinfo=tz.tzlocal()))
<Arrow [2013-05-05T00:00:00-07:00]>

One naive date, to get that date in UTC:

>>> arrow.get(date(2013, 5, 5))
<Arrow [2013-05-05T00:00:00+00:00]>

Two arguments, a naive or aware datetime, and a replacement timezone expression:

>>> arrow.get(datetime(2013, 5, 5), 'US/Pacific')
<Arrow [2013-05-05T00:00:00-07:00]>

Two arguments, a naive date, and a replacement timezone expression:

>>> arrow.get(date(2013, 5, 5), 'US/Pacific')
<Arrow [2013-05-05T00:00:00-07:00]>

Two arguments, both str, to parse the first according to the format of the second:

>>> arrow.get('2013-05-05 12:30:45 America/Chicago', 'YYYY-MM-DD HH:mm:ss ZZZ')
<Arrow [2013-05-05T12:30:45-05:00]>

Two arguments, first a str to parse and second a list of formats to try:

>>> arrow.get('2013-05-05 12:30:45', ['MM/DD/YYYY', 'YYYY-MM-DD HH:mm:ss'])
<Arrow [2013-05-05T12:30:45+00:00]>

Three or more arguments, as for the constructor of a datetime:

>>> arrow.get(2013, 5, 5, 12, 30, 45)
<Arrow [2013-05-05T12:30:45+00:00]>

One time.struct time:

>>> arrow.get(gmtime(0))
<Arrow [1970-01-01T00:00:00+00:00]>
arrow.api.utcnow()

Returns an Arrow object, representing “now” in UTC time.

Usage:

>>> import arrow
>>> arrow.utcnow()
<Arrow [2013-05-08T05:19:07.018993+00:00]>
arrow.api.now(tz=None)

Returns an Arrow object, representing “now” in the given timezone.

Parameters

tz – (optional) A timezone expression. Defaults to local time.

Usage:

>>> import arrow
>>> arrow.now()
<Arrow [2013-05-07T22:19:11.363410-07:00]>

>>> arrow.now('US/Pacific')
<Arrow [2013-05-07T22:19:15.251821-07:00]>

>>> arrow.now('+02:00')
<Arrow [2013-05-08T07:19:25.618646+02:00]>

>>> arrow.now('local')
<Arrow [2013-05-07T22:19:39.130059-07:00]>
arrow.api.factory(type)

Returns an ArrowFactory for the specified Arrow or derived type.

Parameters

type – the type, Arrow or derived.

arrow.locale

class arrow.locales.AfrikaansLocale
day_abbreviations = ['', 'Ma', 'Di', 'Wo', 'Do', 'Vr', 'Za', 'So']
day_names = ['', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag', 'Sondag']
future = 'in {0}'
month_abbreviations = ['', 'Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des']
month_names = ['', 'Januarie', 'Februarie', 'Maart', 'April', 'Mei', 'Junie', 'Julie', 'Augustus', 'September', 'Oktober', 'November', 'Desember']
names = ['af', 'af_nl']
past = '{0} gelede'
timeframes = {'day': 'een dag', 'days': '{0} dae', 'hour': 'uur', 'hours': '{0} ure', 'minute': 'minuut', 'minutes': '{0} minute', 'month': 'een maand', 'months': '{0} maande', 'now': 'nou', 'seconds': 'sekondes', 'year': 'een jaar', 'years': '{0} jaar'}
class arrow.locales.AlgeriaTunisiaArabicLocale
month_abbreviations = ['', 'جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان', 'جويلية', 'أوت', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر']
month_names = ['', 'جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان', 'جويلية', 'أوت', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر']
names = ['ar_tn', 'ar_dz']
class arrow.locales.ArabicLocale
day_abbreviations = ['', 'إثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت', 'أحد']
day_names = ['', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت', 'الأحد']
future = 'خلال {0}'
month_abbreviations = ['', 'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر']
month_names = ['', 'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر']
names = ['ar', 'ar_ae', 'ar_bh', 'ar_dj', 'ar_eg', 'ar_eh', 'ar_er', 'ar_km', 'ar_kw', 'ar_ly', 'ar_om', 'ar_qa', 'ar_sa', 'ar_sd', 'ar_so', 'ar_ss', 'ar_td', 'ar_ye']
past = 'منذ {0}'
timeframes = {'day': 'يوم', 'days': {'double': 'يومين', 'higher': '{0} يوم', 'ten': '{0} أيام'}, 'hour': 'ساعة', 'hours': {'double': 'ساعتين', 'higher': '{0} ساعة', 'ten': '{0} ساعات'}, 'minute': 'دقيقة', 'minutes': {'double': 'دقيقتين', 'higher': '{0} دقيقة', 'ten': '{0} دقائق'}, 'month': 'شهر', 'months': {'double': 'شهرين', 'higher': '{0} شهر', 'ten': '{0} أشهر'}, 'now': 'الآن', 'seconds': {'double': 'ثانيتين', 'higher': '{0} ثانية', 'ten': '{0} ثوان'}, 'year': 'سنة', 'years': {'double': 'سنتين', 'higher': '{0} سنة', 'ten': '{0} سنوات'}}
class arrow.locales.AustrianLocale
month_names = ['', 'Jänner', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember']
names = ['de_at']
class arrow.locales.AzerbaijaniLocale
day_abbreviations = ['', 'Ber', 'Çax', 'Çər', 'Cax', 'Cüm', 'Şnb', 'Bzr']
day_names = ['', 'Bazar ertəsi', 'Çərşənbə axşamı', 'Çərşənbə', 'Cümə axşamı', 'Cümə', 'Şənbə', 'Bazar']
future = '{0} sonra'
month_abbreviations = ['', 'Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyn', 'İyl', 'Avq', 'Sen', 'Okt', 'Noy', 'Dek']
month_names = ['', 'Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'İyun', 'İyul', 'Avqust', 'Sentyabr', 'Oktyabr', 'Noyabr', 'Dekabr']
names = ['az', 'az_az']
past = '{0} əvvəl'
timeframes = {'day': 'bir gün', 'days': '{0} gün', 'hour': 'bir saat', 'hours': '{0} saat', 'minute': 'bir dəqiqə', 'minutes': '{0} dəqiqə', 'month': 'bir ay', 'months': '{0} ay', 'now': 'indi', 'seconds': 'saniyə', 'year': 'il', 'years': '{0} il'}
class arrow.locales.BasqueLocale
day_abbreviations = ['', 'al', 'ar', 'az', 'og', 'ol', 'lr', 'ig']
day_names = ['', 'astelehena', 'asteartea', 'asteazkena', 'osteguna', 'ostirala', 'larunbata', 'igandea']
future = '{0}'
month_abbreviations = ['', 'urt', 'ots', 'mar', 'api', 'mai', 'eka', 'uzt', 'abu', 'ira', 'urr', 'aza', 'abe']
month_names = ['', 'urtarrilak', 'otsailak', 'martxoak', 'apirilak', 'maiatzak', 'ekainak', 'uztailak', 'abuztuak', 'irailak', 'urriak', 'azaroak', 'abenduak']
names = ['eu', 'eu_eu']
past = 'duela {0}'
timeframes = {'day': 'egun bat', 'days': '{0} egun', 'hour': 'ordu bat', 'hours': '{0} ordu', 'minute': 'minutu bat', 'minutes': '{0} minutu', 'month': 'hilabete bat', 'months': '{0} hilabet', 'now': 'Orain', 'seconds': 'segundu', 'year': 'urte bat', 'years': '{0} urte'}
class arrow.locales.BelarusianLocale
day_abbreviations = ['', 'пн', 'ат', 'ср', 'чц', 'пт', 'сб', 'нд']
day_names = ['', 'панядзелак', 'аўторак', 'серада', 'чацвер', 'пятніца', 'субота', 'нядзеля']
future = 'праз {0}'
month_abbreviations = ['', 'студ', 'лют', 'сак', 'крас', 'трав', 'чэрв', 'ліп', 'жнів', 'вер', 'каст', 'ліст', 'снеж']
month_names = ['', 'студзеня', 'лютага', 'сакавіка', 'красавіка', 'траўня', 'чэрвеня', 'ліпеня', 'жніўня', 'верасня', 'кастрычніка', 'лістапада', 'снежня']
names = ['be', 'be_by']
past = '{0} таму'
timeframes = {'day': 'дзень', 'days': ['{0} дзень', '{0} дні', '{0} дзён'], 'hour': 'гадзіну', 'hours': ['{0} гадзіну', '{0} гадзіны', '{0} гадзін'], 'minute': 'хвіліну', 'minutes': ['{0} хвіліну', '{0} хвіліны', '{0} хвілін'], 'month': 'месяц', 'months': ['{0} месяц', '{0} месяцы', '{0} месяцаў'], 'now': 'зараз', 'seconds': 'некалькі секунд', 'year': 'год', 'years': ['{0} год', '{0} гады', '{0} гадоў']}
class arrow.locales.BengaliLocale
day_abbreviations = ['', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহঃ', 'শুক্র', 'শনি', 'রবি']
day_names = ['', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার', 'শনিবার', 'রবিবার']
future = '{0} পরে'
meridians = {'AM': 'সকাল', 'PM': 'বিকাল', 'am': 'সকাল', 'pm': 'বিকাল'}
month_abbreviations = ['', 'জানু', 'ফেব', 'মার্চ', 'এপ্রি', 'মে', 'জুন', 'জুল', 'অগা', 'সেপ্ট', 'অক্টো', 'নভে', 'ডিসে']
month_names = ['', 'জানুয়ারি', 'ফেব্রুয়ারি', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর']
names = ['bn', 'bn_bd', 'bn_in']
past = '{0} আগে'
timeframes = {'day': 'এক দিন', 'days': '{0} দিন', 'hour': 'এক ঘণ্টা', 'hours': '{0} ঘণ্টা', 'minute': 'এক মিনিট', 'minutes': '{0} মিনিট', 'month': 'এক মাস', 'months': '{0} মাস ', 'now': 'এখন', 'seconds': 'সেকেন্ড', 'year': 'এক বছর', 'years': '{0} বছর'}
class arrow.locales.BrazilianPortugueseLocale
day_abbreviations = ['', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab', 'Dom']
day_names = ['', 'Segunda-feira', 'Terça-feira', 'Quarta-feira', 'Quinta-feira', 'Sexta-feira', 'Sábado', 'Domingo']
future = 'em {0}'
month_abbreviations = ['', 'Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez']
month_names = ['', 'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro']
names = ['pt_br']
past = 'faz {0}'
timeframes = {'day': 'um dia', 'days': '{0} dias', 'hour': 'uma hora', 'hours': '{0} horas', 'minute': 'um minuto', 'minutes': '{0} minutos', 'month': 'um mês', 'months': '{0} meses', 'now': 'agora', 'seconds': 'segundos', 'year': 'um ano', 'years': '{0} anos'}
class arrow.locales.BulgarianLocale
day_abbreviations = ['', 'пон', 'вт', 'ср', 'четв', 'пет', 'съб', 'нед']
day_names = ['', 'понеделник', 'вторник', 'сряда', 'четвъртък', 'петък', 'събота', 'неделя']
future = 'напред {0}'
month_abbreviations = ['', 'ян', 'февр', 'март', 'апр', 'май', 'юни', 'юли', 'авг', 'септ', 'окт', 'ноем', 'дек']
month_names = ['', 'януари', 'февруари', 'март', 'април', 'май', 'юни', 'юли', 'август', 'септември', 'октомври', 'ноември', 'декември']
names = ['bg', 'bg_BG']
past = '{0} назад'
timeframes = {'day': 'ден', 'days': ['{0} ден', '{0} дни', '{0} дни'], 'hour': 'час', 'hours': ['{0} час', '{0} часа', '{0} часа'], 'minute': 'минута', 'minutes': ['{0} минута', '{0} минути', '{0} минути'], 'month': 'месец', 'months': ['{0} месец', '{0} месеца', '{0} месеца'], 'now': 'сега', 'seconds': 'няколко секунди', 'year': 'година', 'years': ['{0} година', '{0} години', '{0} години']}
class arrow.locales.CatalanLocale
day_abbreviations = ['', 'Dilluns', 'Dimarts', 'Dimecres', 'Dijous', 'Divendres', 'Dissabte', 'Diumenge']
day_names = ['', 'Dilluns', 'Dimarts', 'Dimecres', 'Dijous', 'Divendres', 'Dissabte', 'Diumenge']
future = 'En {0}'
month_abbreviations = ['', 'Gener', 'Febrer', 'Març', 'Abril', 'Maig', 'Juny', 'Juliol', 'Agost', 'Setembre', 'Octubre', 'Novembre', 'Desembre']
month_names = ['', 'Gener', 'Febrer', 'Març', 'Abril', 'Maig', 'Juny', 'Juliol', 'Agost', 'Setembre', 'Octubre', 'Novembre', 'Desembre']
names = ['ca', 'ca_es', 'ca_ad', 'ca_fr', 'ca_it']
past = 'Fa {0}'
timeframes = {'day': 'un dia', 'days': '{0} dies', 'hour': 'una hora', 'hours': '{0} hores', 'minute': '1 minut', 'minutes': '{0} minuts', 'month': 'un mes', 'months': '{0} mesos', 'now': 'Ara mateix', 'seconds': 'segons', 'year': 'un any', 'years': '{0} anys'}
class arrow.locales.ChineseCNLocale
day_abbreviations = ['', '一', '二', '三', '四', '五', '六', '日']
day_names = ['', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日']
future = '{0}后'
month_abbreviations = ['', ' 1', ' 2', ' 3', ' 4', ' 5', ' 6', ' 7', ' 8', ' 9', '10', '11', '12']
month_names = ['', '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
names = ['zh', 'zh_cn']
past = '{0}前'
timeframes = {'day': '1天', 'days': '{0}天', 'hour': '1小时', 'hours': '{0}小时', 'minute': '1分钟', 'minutes': '{0}分钟', 'month': '1个月', 'months': '{0}个月', 'now': '刚才', 'seconds': '几秒', 'year': '1年', 'years': '{0}年'}
class arrow.locales.ChineseTWLocale
day_abbreviations = ['', '一', '二', '三', '四', '五', '六', '日']
day_names = ['', '周一', '周二', '周三', '周四', '周五', '周六', '周日']
future = '{0}後'
month_abbreviations = ['', ' 1', ' 2', ' 3', ' 4', ' 5', ' 6', ' 7', ' 8', ' 9', '10', '11', '12']
month_names = ['', '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
names = ['zh_tw']
past = '{0}前'
timeframes = {'day': '1天', 'days': '{0}天', 'hour': '1小時', 'hours': '{0}小時', 'minute': '1分鐘', 'minutes': '{0}分鐘', 'month': '1個月', 'months': '{0}個月', 'now': '剛才', 'seconds': '幾秒', 'year': '1年', 'years': '{0}年'}
class arrow.locales.CzechLocale
day_abbreviations = ['', 'po', 'út', 'st', 'čt', 'pá', 'so', 'ne']
day_names = ['', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota', 'neděle']
future = 'Za {0}'
month_abbreviations = ['', 'led', 'úno', 'bře', 'dub', 'kvě', 'čvn', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro']
month_names = ['', 'leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec']
names = ['cs', 'cs_cz']
past = 'Před {0}'
timeframes = {'day': {'future': 'den', 'past': 'dnem', 'zero': '{0} dnů'}, 'days': {'future': ['{0} dny', '{0} dnů'], 'past': '{0} dny'}, 'hour': {'future': 'hodinu', 'past': 'hodinou', 'zero': '{0} hodin'}, 'hours': {'future': ['{0} hodiny', '{0} hodin'], 'past': '{0} hodinami'}, 'minute': {'future': 'minutu', 'past': 'minutou', 'zero': '{0} minut'}, 'minutes': {'future': ['{0} minuty', '{0} minut'], 'past': '{0} minutami'}, 'month': {'future': 'měsíc', 'past': 'měsícem', 'zero': '{0} měsíců'}, 'months': {'future': ['{0} měsíce', '{0} měsíců'], 'past': '{0} měsíci'}, 'now': 'Teď', 'seconds': {'future': ['{0} sekundy', '{0} sekund'], 'past': '{0} sekundami'}, 'year': {'future': 'rok', 'past': 'rokem', 'zero': '{0} let'}, 'years': {'future': ['{0} roky', '{0} let'], 'past': '{0} lety'}}
class arrow.locales.DanishLocale
day_abbreviations = ['', 'man', 'tir', 'ons', 'tor', 'fre', 'lør', 'søn']
day_names = ['', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag', 'søndag']
future = 'efter {0}'
month_abbreviations = ['', 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec']
month_names = ['', 'januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december']
names = ['da', 'da_dk']
past = 'for {0} siden'
timeframes = {'day': 'en dag', 'days': '{0} dage', 'hour': 'en time', 'hours': '{0} timer', 'minute': 'et minut', 'minutes': '{0} minutter', 'month': 'en måned', 'months': '{0} måneder', 'now': 'lige nu', 'seconds': 'et par sekunder', 'year': 'et år', 'years': '{0} år'}
class arrow.locales.DeutschBaseLocale
day_abbreviations = ['', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So']
day_names = ['', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag']
describe(timeframe, delta=0, only_distance=False)

Describes a delta within a timeframe in plain language.

Parameters
  • timeframe – a string representing a timeframe.

  • delta – a quantity representing a delta in a timeframe.

  • only_distance – return only distance eg: “11 seconds” without “in” or “ago” keywords

future = 'in {0}'
month_abbreviations = ['', 'Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez']
month_names = ['', 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember']
past = 'vor {0}'
timeframes = {'day': 'einem Tag', 'days': '{0} Tagen', 'hour': 'einer Stunde', 'hours': '{0} Stunden', 'minute': 'einer Minute', 'minutes': '{0} Minuten', 'month': 'einem Monat', 'months': '{0} Monaten', 'now': 'gerade eben', 'seconds': 'Sekunden', 'year': 'einem Jahr', 'years': '{0} Jahren'}
timeframes_only_distance = {'day': 'ein Tag', 'days': '{0} Tagen', 'hour': 'eine Stunde', 'hours': '{0} Stunden', 'minute': 'eine Minute', 'minutes': '{0} Minuten', 'month': 'ein Monat', 'months': '{0} Monaten', 'now': 'gerade eben', 'seconds': 'Sekunden', 'year': 'ein Jahr', 'years': '{0} Jahren'}
class arrow.locales.DutchLocale
day_abbreviations = ['', 'ma', 'di', 'wo', 'do', 'vr', 'za', 'zo']
day_names = ['', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag', 'zondag']
future = 'over {0}'
month_abbreviations = ['', 'jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec']
month_names = ['', 'januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december']
names = ['nl', 'nl_nl']
past = '{0} geleden'
timeframes = {'day': 'een dag', 'days': '{0} dagen', 'hour': 'een uur', 'hours': '{0} uur', 'minute': 'een minuut', 'minutes': '{0} minuten', 'month': 'een maand', 'months': '{0} maanden', 'now': 'nu', 'seconds': 'seconden', 'year': 'een jaar', 'years': '{0} jaar'}
class arrow.locales.EnglishLocale
day_abbreviations = ['', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
day_names = ['', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
describe(timeframe, delta=0, only_distance=False)

Describes a delta within a timeframe in plain language.

Parameters
  • timeframe – a string representing a timeframe.

  • delta – a quantity representing a delta in a timeframe.

  • only_distance – return only distance eg: “11 seconds” without “in” or “ago” keywords

future = 'in {0}'
meridians = {'AM': 'AM', 'PM': 'PM', 'am': 'am', 'pm': 'pm'}
month_abbreviations = ['', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
month_names = ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
names = ['en', 'en_us', 'en_gb', 'en_au', 'en_be', 'en_jp', 'en_za', 'en_ca', 'en_ph']
ordinal_day_re = '((?P<value>[2-3]?1(?=st)|[2-3]?2(?=nd)|[2-3]?3(?=rd)|[1-3]?[04-9](?=th)|1[1-3](?=th))(st|nd|rd|th))'
past = '{0} ago'
timeframes = {'day': 'a day', 'days': '{0} days', 'hour': 'an hour', 'hours': '{0} hours', 'minute': 'a minute', 'minutes': '{0} minutes', 'month': 'a month', 'months': '{0} months', 'now': 'just now', 'seconds': 'seconds', 'week': 'a week', 'weeks': '{0} weeks', 'year': 'a year', 'years': '{0} years'}
class arrow.locales.EsperantoLocale
day_abbreviations = ['', 'lun', 'mar', 'mer', 'ĵaŭ', 'ven', 'sab', 'dim']
day_names = ['', 'lundo', 'mardo', 'merkredo', 'ĵaŭdo', 'vendredo', 'sabato', 'dimanĉo']
future = 'post {0}'
meridians = {'AM': 'ATM', 'PM': 'PTM', 'am': 'atm', 'pm': 'ptm'}
month_abbreviations = ['', 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aŭg', 'sep', 'okt', 'nov', 'dec']
month_names = ['', 'januaro', 'februaro', 'marto', 'aprilo', 'majo', 'junio', 'julio', 'aŭgusto', 'septembro', 'oktobro', 'novembro', 'decembro']
names = ['eo', 'eo_xx']
ordinal_day_re = '((?P<value>[1-3]?[0-9](?=a))a)'
past = 'antaŭ {0}'
timeframes = {'day': 'unu tago', 'days': '{0} tagoj', 'hour': 'un horo', 'hours': '{0} horoj', 'minute': 'unu minuto', 'minutes': '{0} minutoj', 'month': 'unu monato', 'months': '{0} monatoj', 'now': 'nun', 'seconds': 'kelkaj sekundoj', 'year': 'unu jaro', 'years': '{0} jaroj'}
class arrow.locales.EstonianLocale
day_abbreviations = ['', 'Esm', 'Teis', 'Kolm', 'Nelj', 'Re', 'Lau', 'Püh']
day_names = ['', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev', 'Pühapäev']
future = '{0} pärast'
month_abbreviations = ['', 'Jan', 'Veb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dets']
month_names = ['', 'Jaanuar', 'Veebruar', 'Märts', 'Aprill', 'Mai', 'Juuni', 'Juuli', 'August', 'September', 'Oktoober', 'November', 'Detsember']
names = ['ee', 'et']
past = '{0} tagasi'
timeframes = {'day': {'future': 'ühe päeva', 'past': 'üks päev'}, 'days': {'future': '{0} päeva', 'past': '{0} päeva'}, 'hour': {'future': 'tunni aja', 'past': 'tund aega'}, 'hours': {'future': '{0} tunni', 'past': '{0} tundi'}, 'minute': {'future': 'ühe minuti', 'past': 'üks minut'}, 'minutes': {'future': '{0} minuti', 'past': '{0} minutit'}, 'month': {'future': 'ühe kuu', 'past': 'üks kuu'}, 'months': {'future': '{0} kuu', 'past': '{0} kuud'}, 'now': {'future': 'just nüüd', 'past': 'just nüüd'}, 'second': {'future': 'ühe sekundi', 'past': 'üks sekund'}, 'seconds': {'future': '{0} sekundi', 'past': '{0} sekundit'}, 'year': {'future': 'ühe aasta', 'past': 'üks aasta'}, 'years': {'future': '{0} aasta', 'past': '{0} aastat'}}
class arrow.locales.FarsiLocale
day_abbreviations = ['', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
day_names = ['', 'دو شنبه', 'سه شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه', 'یکشنبه']
future = 'در {0}'
meridians = {'AM': 'قبل از ظهر', 'PM': 'بعد از ظهر', 'am': 'قبل از ظهر', 'pm': 'بعد از ظهر'}
month_abbreviations = ['', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
month_names = ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
names = ['fa', 'fa_ir']
past = '{0} قبل'
timeframes = {'day': 'یک روز', 'days': '{0} روز', 'hour': 'یک ساعت', 'hours': '{0} ساعت', 'minute': 'یک دقیقه', 'minutes': '{0} دقیقه', 'month': 'یک ماه', 'months': '{0} ماه', 'now': 'اکنون', 'seconds': 'ثانیه', 'year': 'یک سال', 'years': '{0} سال'}
class arrow.locales.FinnishLocale
day_abbreviations = ['', 'ma', 'ti', 'ke', 'to', 'pe', 'la', 'su']
day_names = ['', 'maanantai', 'tiistai', 'keskiviikko', 'torstai', 'perjantai', 'lauantai', 'sunnuntai']
future = '{0} kuluttua'
month_abbreviations = ['', 'tammi', 'helmi', 'maalis', 'huhti', 'touko', 'kesä', 'heinä', 'elo', 'syys', 'loka', 'marras', 'joulu']
month_names = ['', 'tammikuu', 'helmikuu', 'maaliskuu', 'huhtikuu', 'toukokuu', 'kesäkuu', 'heinäkuu', 'elokuu', 'syyskuu', 'lokakuu', 'marraskuu', 'joulukuu']
names = ['fi', 'fi_fi']
past = '{0} sitten'
timeframes = {'day': ['päivä', 'päivä'], 'days': ['{0} päivää', '{0} päivän'], 'hour': ['tunti', 'tunnin'], 'hours': ['{0} tuntia', '{0} tunnin'], 'minute': ['minuutti', 'minuutin'], 'minutes': ['{0} minuuttia', '{0} minuutin'], 'month': ['kuukausi', 'kuukauden'], 'months': ['{0} kuukautta', '{0} kuukauden'], 'now': ['juuri nyt', 'juuri nyt'], 'seconds': ['muutama sekunti', 'muutaman sekunnin'], 'year': ['vuosi', 'vuoden'], 'years': ['{0} vuotta', '{0} vuoden']}
class arrow.locales.FrenchLocale
day_abbreviations = ['', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam', 'dim']
day_names = ['', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche']
future = 'dans {0}'
month_abbreviations = ['', 'janv', 'févr', 'mars', 'avr', 'mai', 'juin', 'juil', 'août', 'sept', 'oct', 'nov', 'déc']
month_names = ['', 'janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre']
names = ['fr', 'fr_fr']
ordinal_day_re = '((?P<value>\\b1(?=er\\b)|[1-3]?[02-9](?=e\\b)|[1-3]1(?=e\\b))(er|e)\\b)'
past = 'il y a {0}'
timeframes = {'day': 'un jour', 'days': '{0} jours', 'hour': 'une heure', 'hours': '{0} heures', 'minute': 'une minute', 'minutes': '{0} minutes', 'month': 'un mois', 'months': '{0} mois', 'now': 'maintenant', 'seconds': 'quelques secondes', 'year': 'un an', 'years': '{0} ans'}
class arrow.locales.GermanLocale
names = ['de', 'de_de']
class arrow.locales.GreekLocale
day_abbreviations = ['', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ', 'Κυρ']
day_names = ['', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο', 'Κυριακή']
future = 'σε {0}'
month_abbreviations = ['', 'Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαϊ', 'Ιον', 'Ιολ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ']
month_names = ['', 'Ιανουαρίου', 'Φεβρουαρίου', 'Μαρτίου', 'Απριλίου', 'Μαΐου', 'Ιουνίου', 'Ιουλίου', 'Αυγούστου', 'Σεπτεμβρίου', 'Οκτωβρίου', 'Νοεμβρίου', 'Δεκεμβρίου']
names = ['el', 'el_gr']
past = '{0} πριν'
timeframes = {'day': 'μία μέρα', 'days': '{0} μέρες', 'hour': 'μία ώρα', 'hours': '{0} ώρες', 'minute': 'ένα λεπτό', 'minutes': '{0} λεπτά', 'month': 'ένα μήνα', 'months': '{0} μήνες', 'now': 'τώρα', 'seconds': 'δευτερόλεπτα', 'year': 'ένα χρόνο', 'years': '{0} χρόνια'}
class arrow.locales.HebrewLocale
day_abbreviations = ['', 'ב׳', 'ג׳', 'ד׳', 'ה׳', 'ו׳', 'ש׳', 'א׳']
day_names = ['', 'שני', 'שלישי', 'רביעי', 'חמישי', 'שישי', 'שבת', 'ראשון']
future = 'בעוד {0}'
meridians = {'AM': 'לפני הצהריים', 'PM': 'אחרי הצהריים', 'am': 'לפנ"צ', 'pm': 'אחר"צ'}
month_abbreviations = ['', 'ינו׳', 'פבר׳', 'מרץ', 'אפר׳', 'מאי', 'יוני', 'יולי', 'אוג׳', 'ספט׳', 'אוק׳', 'נוב׳', 'דצמ׳']
month_names = ['', 'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר']
names = ['he', 'he_IL']
past = 'לפני {0}'
timeframes = {'2-days': 'יומיים', '2-hours': 'שעתיים', '2-months': 'חודשיים', '2-years': 'שנתיים', 'day': 'יום', 'days': '{0} ימים', 'hour': 'שעה', 'hours': '{0} שעות', 'minute': 'דקה', 'minutes': '{0} דקות', 'month': 'חודש', 'months': '{0} חודשים', 'now': 'הרגע', 'seconds': 'שניות', 'year': 'שנה', 'years': '{0} שנים'}
class arrow.locales.HindiLocale
day_abbreviations = ['', 'सोम', 'मंगल', 'बुध', 'गुरुवार', 'शुक्र', 'शनि', 'रवि']
day_names = ['', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार', 'रविवार']
future = '{0} बाद'
meridians = {'AM': 'सुबह', 'PM': 'शाम', 'am': 'सुबह', 'pm': 'शाम'}
month_abbreviations = ['', 'जन', 'फ़र', 'मार्च', 'अप्रै', 'मई', 'जून', 'जुलाई', 'आग', 'सित', 'अकत', 'नवे', 'दिस']
month_names = ['', 'जनवरी', 'फरवरी', 'मार्च', 'अप्रैल ', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितंबर', 'अक्टूबर', 'नवंबर', 'दिसंबर']
names = ['hi']
past = '{0} पहले'
timeframes = {'day': 'एक दिन', 'days': '{0} दिन', 'hour': 'एक घंटा', 'hours': '{0} घंटे', 'minute': 'एक मिनट ', 'minutes': '{0} मिनट ', 'month': 'एक माह ', 'months': '{0} महीने ', 'now': 'अभी', 'seconds': 'सेकंड्', 'year': 'एक वर्ष ', 'years': '{0} साल '}
class arrow.locales.HungarianLocale
day_abbreviations = ['', 'hét', 'kedd', 'szer', 'csüt', 'pént', 'szom', 'vas']
day_names = ['', 'hétfő', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat', 'vasárnap']
future = '{0} múlva'
meridians = {'AM': 'DE', 'PM': 'DU', 'am': 'de', 'pm': 'du'}
month_abbreviations = ['', 'jan', 'febr', 'márc', 'ápr', 'máj', 'jún', 'júl', 'aug', 'szept', 'okt', 'nov', 'dec']
month_names = ['', 'január', 'február', 'március', 'április', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december']
names = ['hu', 'hu_hu']
past = '{0} ezelőtt'
timeframes = {'day': {'future': 'egy nap', 'past': 'egy nappal'}, 'days': {'future': '{0} nap', 'past': '{0} nappal'}, 'hour': {'future': 'egy óra', 'past': 'egy órával'}, 'hours': {'future': '{0} óra', 'past': '{0} órával'}, 'minute': {'future': 'egy perc', 'past': 'egy perccel'}, 'minutes': {'future': '{0} perc', 'past': '{0} perccel'}, 'month': {'future': 'egy hónap', 'past': 'egy hónappal'}, 'months': {'future': '{0} hónap', 'past': '{0} hónappal'}, 'now': 'éppen most', 'seconds': {'future': 'pár másodperc', 'past': 'másodpercekkel'}, 'year': {'future': 'egy év', 'past': 'egy évvel'}, 'years': {'future': '{0} év', 'past': '{0} évvel'}}
class arrow.locales.IcelandicLocale
day_abbreviations = ['', 'mán', 'þri', 'mið', 'fim', 'fös', 'lau', 'sun']
day_names = ['', 'mánudagur', 'þriðjudagur', 'miðvikudagur', 'fimmtudagur', 'föstudagur', 'laugardagur', 'sunnudagur']
future = 'eftir {0}'
meridians = {'AM': 'f.h.', 'PM': 'e.h.', 'am': 'f.h.', 'pm': 'e.h.'}
month_abbreviations = ['', 'jan', 'feb', 'mar', 'apr', 'maí', 'jún', 'júl', 'ágú', 'sep', 'okt', 'nóv', 'des']
month_names = ['', 'janúar', 'febrúar', 'mars', 'apríl', 'maí', 'júní', 'júlí', 'ágúst', 'september', 'október', 'nóvember', 'desember']
names = ['is', 'is_is']
past = 'fyrir {0} síðan'
timeframes = {'day': ('einum degi', 'einn dag'), 'days': ('{0} dögum', '{0} daga'), 'hour': ('einum tíma', 'einn tíma'), 'hours': ('{0} tímum', '{0} tíma'), 'minute': ('einni mínútu', 'eina mínútu'), 'minutes': ('{0} mínútum', '{0} mínútur'), 'month': ('einum mánuði', 'einn mánuð'), 'months': ('{0} mánuðum', '{0} mánuði'), 'now': 'rétt í þessu', 'seconds': ('nokkrum sekúndum', 'nokkrar sekúndur'), 'year': ('einu ári', 'eitt ár'), 'years': ('{0} árum', '{0} ár')}
class arrow.locales.IndonesianLocale
day_abbreviations = ['', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu', 'Minggu']
day_names = ['', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu', 'Minggu']
future = 'dalam {0}'
meridians = {'AM': '', 'PM': '', 'am': '', 'pm': ''}
month_abbreviations = ['', 'Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Ags', 'Sept', 'Okt', 'Nov', 'Des']
month_names = ['', 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember']
names = ['id', 'id_id']
past = '{0} yang lalu'
timeframes = {'day': '1 hari', 'days': '{0} hari', 'hour': '1 jam', 'hours': '{0} jam', 'minute': '1 menit', 'minutes': '{0} menit', 'month': '1 bulan', 'months': '{0} bulan', 'now': 'baru saja', 'seconds': 'detik', 'year': '1 tahun', 'years': '{0} tahun'}
class arrow.locales.ItalianLocale
day_abbreviations = ['', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab', 'dom']
day_names = ['', 'lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato', 'domenica']
future = 'tra {0}'
month_abbreviations = ['', 'gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic']
month_names = ['', 'gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre']
names = ['it', 'it_it']
ordinal_day_re = '((?P<value>[1-3]?[0-9](?=[ºª]))[ºª])'
past = '{0} fa'
timeframes = {'day': 'un giorno', 'days': '{0} giorni', 'hour': "un'ora", 'hours': '{0} ore', 'minute': 'un minuto', 'minutes': '{0} minuti', 'month': 'un mese', 'months': '{0} mesi', 'now': 'adesso', 'seconds': 'qualche secondo', 'year': 'un anno', 'years': '{0} anni'}
class arrow.locales.JapaneseLocale
day_abbreviations = ['', '月', '火', '水', '木', '金', '土', '日']
day_names = ['', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日', '日曜日']
future = '{0}後'
month_abbreviations = ['', ' 1', ' 2', ' 3', ' 4', ' 5', ' 6', ' 7', ' 8', ' 9', '10', '11', '12']
month_names = ['', '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
names = ['ja', 'ja_jp']
past = '{0}前'
timeframes = {'day': '1日', 'days': '{0}日', 'hour': '1時間', 'hours': '{0}時間', 'minute': '1分', 'minutes': '{0}分', 'month': '1ヶ月', 'months': '{0}ヶ月', 'now': '現在', 'seconds': '数秒', 'year': '1年', 'years': '{0}年'}
class arrow.locales.KoreanLocale
day_abbreviations = ['', '월', '화', '수', '목', '금', '토', '일']
day_names = ['', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일', '일요일']
future = '{0} 후'
month_abbreviations = ['', ' 1', ' 2', ' 3', ' 4', ' 5', ' 6', ' 7', ' 8', ' 9', '10', '11', '12']
month_names = ['', '1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']
names = ['ko', 'ko_kr']
past = '{0} 전'
timeframes = {'day': '1일', 'days': '{0}일', 'hour': '1시간', 'hours': '{0}시간', 'minute': '1분', 'minutes': '{0}분', 'month': '1개월', 'months': '{0}개월', 'now': '지금', 'seconds': '몇 초', 'year': '1년', 'years': '{0}년'}
class arrow.locales.LevantArabicLocale
month_abbreviations = ['', 'كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول']
month_names = ['', 'كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول']
names = ['ar_iq', 'ar_jo', 'ar_lb', 'ar_ps', 'ar_sy']
class arrow.locales.Locale

Represents locale-specific data and functionality.

day_abbreviation(day)

Returns the day abbreviation for a specified day of the week.

Parameters

day – the int day of the week (1-7).

day_abbreviations = []
day_name(day)

Returns the day name for a specified day of the week.

Parameters

day – the int day of the week (1-7).

day_names = []
describe(timeframe, delta=0, only_distance=False)

Describes a delta within a timeframe in plain language.

Parameters
  • timeframe – a string representing a timeframe.

  • delta – a quantity representing a delta in a timeframe.

  • only_distance – return only distance eg: “11 seconds” without “in” or “ago” keywords

future = None
meridian(hour, token)

Returns the meridian indicator for a specified hour and format token.

Parameters
  • hour – the int hour of the day.

  • token – the format token.

meridians = {'AM': '', 'PM': '', 'am': '', 'pm': ''}
month_abbreviation(month)

Returns the month abbreviation for a specified month of the year.

Parameters

month – the int month of the year (1-12).

month_abbreviations = []
month_name(month)

Returns the month name for a specified month of the year.

Parameters

month – the int month of the year (1-12).

month_names = []
month_number(name)

Returns the month number for a month specified by name or abbreviation.

Parameters

name – the month name or abbreviation.

names = []
ordinal_day_re = '(\\d+)'
ordinal_number(n)

Returns the ordinal format of a given integer

Parameters

n – an integer

past = None
timeframes = {'day': '', 'days': '', 'hour': '', 'hours': '', 'minute': '', 'minutes': '', 'month': '', 'months': '', 'now': '', 'seconds': '', 'week': '', 'weeks': '', 'year': '', 'years': ''}
year_abbreviation(year)

Returns the year for specific locale if available

Parameters

name – the int year (4-digit)

year_full(year)

Returns the year for specific locale if available

Parameters

name – the int year (4-digit)

class arrow.locales.MacedonianLocale
day_abbreviations = ['', 'Пон.', ' Вт.', ' Сре.', ' Чет.', ' Пет.', ' Саб.', ' Нед.']
day_names = ['', 'Понеделник', ' Вторник', ' Среда', ' Четврток', ' Петок', ' Сабота', ' Недела']
future = 'за {0}'
meridians = {'AM': 'претпладне', 'PM': 'попладне', 'am': 'дп', 'pm': 'пп'}
month_abbreviations = ['', 'Јан.', ' Фев.', ' Мар.', ' Апр.', ' Мај', ' Јун.', ' Јул.', ' Авг.', ' Септ.', ' Окт.', ' Ноем.', ' Декем.']
month_names = ['', 'Јануари', 'Февруари', 'Март', 'Април', 'Мај', 'Јуни', 'Јули', 'Август', 'Септември', 'Октомври', 'Ноември', 'Декември']
names = ['mk', 'mk_mk']
past = 'пред {0}'
timeframes = {'day': 'еден ден', 'days': ['{0} ден', '{0} дена', '{0} дена'], 'hour': 'еден саат', 'hours': ['{0} саат', '{0} саати', '{0} саати'], 'minute': 'една минута', 'minutes': ['{0} минута', '{0} минути', '{0} минути'], 'month': 'еден месец', 'months': ['{0} месец', '{0} месеци', '{0} месеци'], 'now': 'сега', 'seconds': 'секунди', 'year': 'една година', 'years': ['{0} година', '{0} години', '{0} години']}
class arrow.locales.MalayalamLocale
day_abbreviations = ['', 'തിങ്കള്\u200d', 'ചൊവ്വ', 'ബുധന്\u200d', 'വ്യാഴം', 'വെള്ളി', 'ശനി', 'ഞായര്\u200d']
day_names = ['', 'തിങ്കള്\u200d', 'ചൊവ്വ', 'ബുധന്\u200d', 'വ്യാഴം', 'വെള്ളി', 'ശനി', 'ഞായര്\u200d']
future = '{0} ശേഷം'
meridians = {'AM': 'രാവിലെ', 'PM': 'ഉച്ചക്ക് ശേഷം', 'am': 'രാവിലെ', 'pm': 'ഉച്ചക്ക് ശേഷം'}
month_abbreviations = ['', 'ജനു', 'ഫെബ് ', 'മാർ', 'ഏപ്രിൽ', 'മേയ്', 'ജൂണ്\u200d', 'ജൂലൈ', 'ഓഗസ്റ', 'സെപ്റ്റ', 'ഒക്ടോ', 'നവം', 'ഡിസം']
month_names = ['', 'ജനുവരി', 'ഫെബ്രുവരി', 'മാർച്ച്\u200c', 'ഏപ്രിൽ ', 'മെയ്\u200c ', 'ജൂണ്\u200d', 'ജൂലൈ', 'ഓഗസ്റ്റ്\u200c', 'സെപ്റ്റംബർ', 'ഒക്ടോബർ', 'നവംബർ', 'ഡിസംബർ']
names = ['ml']
past = '{0} മുമ്പ്'
timeframes = {'day': 'ഒരു ദിവസം ', 'days': '{0} ദിവസം ', 'hour': 'ഒരു മണിക്കൂർ', 'hours': '{0} മണിക്കൂർ', 'minute': 'ഒരു മിനിറ്റ്', 'minutes': '{0} മിനിറ്റ്', 'month': 'ഒരു മാസം ', 'months': '{0} മാസം ', 'now': 'ഇപ്പോൾ', 'seconds': 'സെക്കന്റ്\u200c', 'year': 'ഒരു വർഷം ', 'years': '{0} വർഷം '}
class arrow.locales.MarathiLocale
day_abbreviations = ['', 'सोम', 'मंगळ', 'बुध', 'गुरु', 'शुक्र', 'शनि', 'रवि']
day_names = ['', 'सोमवार', 'मंगळवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार', 'रविवार']
future = '{0} नंतर'
meridians = {'AM': 'सकाळ', 'PM': 'संध्याकाळ', 'am': 'सकाळ', 'pm': 'संध्याकाळ'}
month_abbreviations = ['', 'जान', 'फेब्रु', 'मार्च', 'एप्रि', 'मे', 'जून', 'जुलै', 'अॉग', 'सप्टें', 'अॉक्टो', 'नोव्हें', 'डिसें']
month_names = ['', 'जानेवारी', 'फेब्रुवारी', 'मार्च', 'एप्रिल', 'मे', 'जून', 'जुलै', 'अॉगस्ट', 'सप्टेंबर', 'अॉक्टोबर', 'नोव्हेंबर', 'डिसेंबर']
names = ['mr']
past = '{0} आधी'
timeframes = {'day': 'एक दिवस', 'days': '{0} दिवस', 'hour': 'एक तास', 'hours': '{0} तास', 'minute': 'एक मिनिट ', 'minutes': '{0} मिनिट ', 'month': 'एक महिना ', 'months': '{0} महिने ', 'now': 'सद्य', 'seconds': 'सेकंद', 'year': 'एक वर्ष ', 'years': '{0} वर्ष '}
class arrow.locales.MauritaniaArabicLocale
month_abbreviations = ['', 'يناير', 'فبراير', 'مارس', 'إبريل', 'مايو', 'يونيو', 'يوليو', 'أغشت', 'شتمبر', 'أكتوبر', 'نوفمبر', 'دجمبر']
month_names = ['', 'يناير', 'فبراير', 'مارس', 'إبريل', 'مايو', 'يونيو', 'يوليو', 'أغشت', 'شتمبر', 'أكتوبر', 'نوفمبر', 'دجمبر']
names = ['ar_mr']
class arrow.locales.MoroccoArabicLocale
month_abbreviations = ['', 'يناير', 'فبراير', 'مارس', 'أبريل', 'ماي', 'يونيو', 'يوليوز', 'غشت', 'شتنبر', 'أكتوبر', 'نونبر', 'دجنبر']
month_names = ['', 'يناير', 'فبراير', 'مارس', 'أبريل', 'ماي', 'يونيو', 'يوليوز', 'غشت', 'شتنبر', 'أكتوبر', 'نونبر', 'دجنبر']
names = ['ar_ma']
class arrow.locales.NepaliLocale
day_abbreviations = ['', 'सोम', 'मंगल', 'बुध', 'बिहि', 'शुक्र', 'शनि', 'आइत']
day_names = ['', 'सोमवार', 'मंगलवार', 'बुधवार', 'बिहिवार', 'शुक्रवार', 'शनिवार', 'आइतवार']
future = '{0} पछी'
meridians = {'AM': 'पूर्वाह्न', 'PM': 'अपरान्ह', 'am': 'पूर्वाह्न', 'pm': 'अपरान्ह'}
month_abbreviations = ['', 'जन', 'फेब', 'मार्च', 'एप्रील', 'मे', 'जुन', 'जुलाई', 'अग', 'सेप', 'अक्ट', 'नोव', 'डिस']
month_names = ['', 'जनवरी', 'फेब्रुअरी', 'मार्च', 'एप्रील', 'मे', 'जुन', 'जुलाई', 'अगष्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोवेम्बर', 'डिसेम्बर']
names = ['ne', 'ne_np']
past = '{0} पहिले'
timeframes = {'day': 'एक दिन', 'days': '{0} दिन', 'hour': 'एक घण्टा', 'hours': '{0} घण्टा', 'minute': 'मिनेट', 'minutes': '{0} मिनेट', 'month': 'एक महिना', 'months': '{0} महिना', 'now': 'अहिले', 'seconds': 'सेकण्ड', 'year': 'एक बर्ष', 'years': 'बर्ष'}
class arrow.locales.NewNorwegianLocale
day_abbreviations = ['', 'må', 'ty', 'on', 'to', 'fr', 'la', 'su']
day_names = ['', 'måndag', 'tysdag', 'onsdag', 'torsdag', 'fredag', 'laurdag', 'sundag']
future = 'om {0}'
month_abbreviations = ['', 'jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des']
month_names = ['', 'januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember']
names = ['nn', 'nn_no']
past = 'for {0} sidan'
timeframes = {'day': 'ein dag', 'days': '{0} dagar', 'hour': 'ein time', 'hours': '{0} timar', 'minute': 'ett minutt', 'minutes': '{0} minutt', 'month': 'en månad', 'months': '{0} månader', 'now': 'no nettopp', 'seconds': 'nokre sekund', 'year': 'eit år', 'years': '{0} år'}
class arrow.locales.NorwegianLocale
day_abbreviations = ['', 'ma', 'ti', 'on', 'to', 'fr', 'lø', 'sø']
day_names = ['', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag', 'søndag']
future = 'om {0}'
month_abbreviations = ['', 'jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des']
month_names = ['', 'januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember']
names = ['nb', 'nb_no']
past = 'for {0} siden'
timeframes = {'day': 'en dag', 'days': '{0} dager', 'hour': 'en time', 'hours': '{0} timer', 'minute': 'ett minutt', 'minutes': '{0} minutter', 'month': 'en måned', 'months': '{0} måneder', 'now': 'nå nettopp', 'seconds': 'noen sekunder', 'year': 'ett år', 'years': '{0} år'}
class arrow.locales.PolishLocale
day_abbreviations = ['', 'Pn', 'Wt', 'Śr', 'Czw', 'Pt', 'So', 'Nd']
day_names = ['', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota', 'niedziela']
future = 'za {0}'
month_abbreviations = ['', 'sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru']
month_names = ['', 'styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień']
names = ['pl', 'pl_pl']
past = '{0} temu'
timeframes = {'day': 'dzień', 'days': ['{0} dzień', '{0} dni', '{0} dni'], 'hour': 'godzina', 'hours': ['{0} godzin', '{0} godziny', '{0} godzin'], 'minute': 'minutę', 'minutes': ['{0} minut', '{0} minuty', '{0} minut'], 'month': 'miesiąc', 'months': ['{0} miesiąc', '{0} miesiące', '{0} miesięcy'], 'now': 'teraz', 'seconds': 'kilka sekund', 'year': 'rok', 'years': ['{0} rok', '{0} lata', '{0} lat']}
class arrow.locales.PortugueseLocale
day_abbreviations = ['', 'seg', 'ter', 'qua', 'qui', 'sex', 'sab', 'dom']
day_names = ['', 'segunda-feira', 'terça-feira', 'quarta-feira', 'quinta-feira', 'sexta-feira', 'sábado', 'domingo']
future = 'em {0}'
month_abbreviations = ['', 'jan', 'fev', 'mar', 'abr', 'maio', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez']
month_names = ['', 'janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro']
names = ['pt', 'pt_pt']
past = 'há {0}'
timeframes = {'day': 'um dia', 'days': '{0} dias', 'hour': 'uma hora', 'hours': '{0} horas', 'minute': 'um minuto', 'minutes': '{0} minutos', 'month': 'um mês', 'months': '{0} meses', 'now': 'agora', 'seconds': 'segundos', 'year': 'um ano', 'years': '{0} anos'}
class arrow.locales.RomanianLocale
day_abbreviations = ['', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm', 'Dum']
day_names = ['', 'luni', 'marți', 'miercuri', 'joi', 'vineri', 'sâmbătă', 'duminică']
future = 'peste {0}'
month_abbreviations = ['', 'ian', 'febr', 'mart', 'apr', 'mai', 'iun', 'iul', 'aug', 'sept', 'oct', 'nov', 'dec']
month_names = ['', 'ianuarie', 'februarie', 'martie', 'aprilie', 'mai', 'iunie', 'iulie', 'august', 'septembrie', 'octombrie', 'noiembrie', 'decembrie']
names = ['ro', 'ro_ro']
past = '{0} în urmă'
timeframes = {'day': 'o zi', 'days': '{0} zile', 'hour': 'o oră', 'hours': '{0} ore', 'minute': 'un minut', 'minutes': '{0} minute', 'month': 'o lună', 'months': '{0} luni', 'now': 'acum', 'seconds': 'câteva secunde', 'year': 'un an', 'years': '{0} ani'}
class arrow.locales.RomanshLocale
day_abbreviations = ['', 'gli', 'ma', 'me', 'gie', 've', 'so', 'du']
day_names = ['', 'glindesdi', 'mardi', 'mesemna', 'gievgia', 'venderdi', 'sonda', 'dumengia']
future = 'en {0}'
month_abbreviations = ['', 'schan', 'fav', 'mars', 'avr', 'matg', 'zer', 'fan', 'avu', 'set', 'oct', 'nov', 'dec']
month_names = ['', 'schaner', 'favrer', 'mars', 'avrigl', 'matg', 'zercladur', 'fanadur', 'avust', 'settember', 'october', 'november', 'december']
names = ['rm', 'rm_ch']
past = 'avant {0}'
timeframes = {'day': 'in di', 'days': '{0} dis', 'hour': "in'ura", 'hours': '{0} ura', 'minute': 'ina minuta', 'minutes': '{0} minutas', 'month': 'in mais', 'months': '{0} mais', 'now': 'en quest mument', 'seconds': 'secundas', 'year': 'in onn', 'years': '{0} onns'}
class arrow.locales.RussianLocale
day_abbreviations = ['', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб', 'вс']
day_names = ['', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота', 'воскресенье']
future = 'через {0}'
month_abbreviations = ['', 'янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек']
month_names = ['', 'января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря']
names = ['ru', 'ru_ru']
past = '{0} назад'
timeframes = {'day': 'день', 'days': ['{0} день', '{0} дня', '{0} дней'], 'hour': 'час', 'hours': ['{0} час', '{0} часа', '{0} часов'], 'minute': 'минуту', 'minutes': ['{0} минуту', '{0} минуты', '{0} минут'], 'month': 'месяц', 'months': ['{0} месяц', '{0} месяца', '{0} месяцев'], 'now': 'сейчас', 'seconds': 'несколько секунд', 'year': 'год', 'years': ['{0} год', '{0} года', '{0} лет']}
class arrow.locales.SlavicBaseLocale
class arrow.locales.SlovakLocale
day_abbreviations = ['', 'po', 'ut', 'st', 'št', 'pi', 'so', 'ne']
day_names = ['', 'pondelok', 'utorok', 'streda', 'štvrtok', 'piatok', 'sobota', 'nedeľa']
future = 'O {0}'
month_abbreviations = ['', 'jan', 'feb', 'mar', 'apr', 'máj', 'jún', 'júl', 'aug', 'sep', 'okt', 'nov', 'dec']
month_names = ['', 'január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december']
names = ['sk', 'sk_sk']
past = 'Pred {0}'
timeframes = {'day': {'future': 'deň', 'past': 'dňom', 'zero': '{0} dní'}, 'days': {'future': ['{0} dni', '{0} dní'], 'past': '{0} dňami'}, 'hour': {'future': 'hodinu', 'past': 'hodinou', 'zero': '{0} hodín'}, 'hours': {'future': ['{0} hodiny', '{0} hodín'], 'past': '{0} hodinami'}, 'minute': {'future': 'minútu', 'past': 'minútou', 'zero': '{0} minút'}, 'minutes': {'future': ['{0} minúty', '{0} minút'], 'past': '{0} minútami'}, 'month': {'future': 'mesiac', 'past': 'mesiacom', 'zero': '{0} mesiacov'}, 'months': {'future': ['{0} mesiace', '{0} mesiacov'], 'past': '{0} mesiacmi'}, 'now': 'Teraz', 'seconds': {'future': ['{0} sekundy', '{0} sekúnd'], 'past': 'pár sekundami'}, 'year': {'future': 'rok', 'past': 'rokom', 'zero': '{0} rokov'}, 'years': {'future': ['{0} roky', '{0} rokov'], 'past': '{0} rokmi'}}
class arrow.locales.SlovenianLocale
day_abbreviations = ['', 'Pon', 'Tor', 'Sre', 'Čet', 'Pet', 'Sob', 'Ned']
day_names = ['', 'Ponedeljek', 'Torek', 'Sreda', 'Četrtek', 'Petek', 'Sobota', 'Nedelja']
future = 'čez {0}'
meridians = {'AM': '', 'PM': '', 'am': '', 'pm': ''}
month_abbreviations = ['', 'Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Avg', 'Sep', 'Okt', 'Nov', 'Dec']
month_names = ['', 'Januar', 'Februar', 'Marec', 'April', 'Maj', 'Junij', 'Julij', 'Avgust', 'September', 'Oktober', 'November', 'December']
names = ['sl', 'sl_si']
past = 'pred {0}'
timeframes = {'day': 'dan', 'days': '{0} dni', 'hour': 'uro', 'hours': '{0} ur', 'minute': 'minuta', 'minutes': '{0} minutami', 'month': 'mesec', 'months': '{0} mesecev', 'now': 'zdaj', 'seconds': 'sekund', 'year': 'leto', 'years': '{0} let'}
class arrow.locales.SpanishLocale
day_abbreviations = ['', 'lun', 'mar', 'mie', 'jue', 'vie', 'sab', 'dom']
day_names = ['', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado', 'domingo']
future = 'en {0}'
meridians = {'AM': 'AM', 'PM': 'PM', 'am': 'am', 'pm': 'pm'}
month_abbreviations = ['', 'ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic']
month_names = ['', 'enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre']
names = ['es', 'es_es']
ordinal_day_re = '((?P<value>[1-3]?[0-9](?=[ºª]))[ºª])'
past = 'hace {0}'
timeframes = {'day': 'un día', 'days': '{0} días', 'hour': 'una hora', 'hours': '{0} horas', 'minute': 'un minuto', 'minutes': '{0} minutos', 'month': 'un mes', 'months': '{0} meses', 'now': 'ahora', 'seconds': 'segundos', 'year': 'un año', 'years': '{0} años'}
class arrow.locales.SwedishLocale
day_abbreviations = ['', 'mån', 'tis', 'ons', 'tor', 'fre', 'lör', 'sön']
day_names = ['', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag', 'söndag']
future = 'om {0}'
month_abbreviations = ['', 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec']
month_names = ['', 'januari', 'februari', 'mars', 'april', 'maj', 'juni', 'juli', 'augusti', 'september', 'oktober', 'november', 'december']
names = ['sv', 'sv_se']
past = 'för {0} sen'
timeframes = {'day': 'en dag', 'days': '{0} dagar', 'hour': 'en timme', 'hours': '{0} timmar', 'minute': 'en minut', 'minutes': '{0} minuter', 'month': 'en månad', 'months': '{0} månader', 'now': 'just nu', 'seconds': 'några sekunder', 'year': 'ett år', 'years': '{0} år'}
class arrow.locales.SwissLocale
day_abbreviations = ['', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So']
day_names = ['', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag']
future = 'in {0}'
month_abbreviations = ['', 'Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez']
month_names = ['', 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember']
names = ['de', 'de_ch']
past = 'vor {0}'
timeframes = {'day': 'einem Tag', 'days': '{0} Tagen', 'hour': 'einer Stunde', 'hours': '{0} Stunden', 'minute': 'einer Minute', 'minutes': '{0} Minuten', 'month': 'einem Monat', 'months': '{0} Monaten', 'now': 'gerade eben', 'seconds': 'Sekunden', 'year': 'einem Jahr', 'years': '{0} Jahren'}
class arrow.locales.TagalogLocale
day_abbreviations = ['', 'Lun', 'Mar', 'Miy', 'Huw', 'Biy', 'Sab', 'Lin']
day_names = ['', 'Lunes', 'Martes', 'Miyerkules', 'Huwebes', 'Biyernes', 'Sabado', 'Linggo']
future = '{0} mula ngayon'
month_abbreviations = ['', 'Ene', 'Peb', 'Mar', 'Abr', 'May', 'Hun', 'Hul', 'Ago', 'Set', 'Okt', 'Nob', 'Dis']
month_names = ['', 'Enero', 'Pebrero', 'Marso', 'Abril', 'Mayo', 'Hunyo', 'Hulyo', 'Agosto', 'Setyembre', 'Oktubre', 'Nobyembre', 'Disyembre']
names = ['tl', 'tl_ph']
past = 'nakaraang {0}'
timeframes = {'day': 'isang araw', 'days': '{0} araw', 'hour': 'isang oras', 'hours': '{0} oras', 'minute': 'isang minuto', 'minutes': '{0} minuto', 'month': 'isang buwan', 'months': '{0} buwan', 'now': 'ngayon lang', 'seconds': 'segundo', 'year': 'isang taon', 'years': '{0} taon'}
class arrow.locales.ThaiLocale
BE_OFFSET = 543
day_abbreviations = ['', 'จ', 'อ', 'พ', 'พฤ', 'ศ', 'ส', 'อา']
day_names = ['', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัสบดี', 'ศุกร์', 'เสาร์', 'อาทิตย์']
future = 'ในอีก{1}{0}'
meridians = {'AM': 'AM', 'PM': 'PM', 'am': 'am', 'pm': 'pm'}
month_abbreviations = ['', 'ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.']
month_names = ['', 'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม']
names = ['th', 'th_th']
past = '{0}{1}ที่ผ่านมา'
timeframes = {'day': '1 วัน', 'days': '{0} วัน', 'hour': '1 ชั่วโมง', 'hours': '{0} ชั่วโมง', 'minute': '1 นาที', 'minutes': '{0} นาที', 'month': '1 เดือน', 'months': '{0} เดือน', 'now': 'ขณะนี้', 'seconds': 'ไม่กี่วินาที', 'year': '1 ปี', 'years': '{0} ปี'}
year_abbreviation(year)

Thai always use Buddhist Era (BE) which is CE + 543

year_full(year)

Thai always use Buddhist Era (BE) which is CE + 543

class arrow.locales.TurkishLocale
day_abbreviations = ['', 'Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt', 'Paz']
day_names = ['', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi', 'Pazar']
future = '{0} sonra'
month_abbreviations = ['', 'Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara']
month_names = ['', 'Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık']
names = ['tr', 'tr_tr']
past = '{0} önce'
timeframes = {'day': 'bir gün', 'days': '{0} gün', 'hour': 'bir saat', 'hours': '{0} saat', 'minute': 'bir dakika', 'minutes': '{0} dakika', 'month': 'bir ay', 'months': '{0} ay', 'now': 'şimdi', 'seconds': 'saniye', 'year': 'yıl', 'years': '{0} yıl'}
class arrow.locales.UkrainianLocale
day_abbreviations = ['', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб', 'нд']
day_names = ['', 'понеділок', 'вівторок', 'середа', 'четвер', 'п’ятниця', 'субота', 'неділя']
future = 'за {0}'
month_abbreviations = ['', 'січ', 'лют', 'бер', 'квіт', 'трав', 'черв', 'лип', 'серп', 'вер', 'жовт', 'лист', 'груд']
month_names = ['', 'січня', 'лютого', 'березня', 'квітня', 'травня', 'червня', 'липня', 'серпня', 'вересня', 'жовтня', 'листопада', 'грудня']
names = ['ua', 'uk_ua']
past = '{0} тому'
timeframes = {'day': 'день', 'days': ['{0} день', '{0} дні', '{0} днів'], 'hour': 'годину', 'hours': ['{0} годину', '{0} години', '{0} годин'], 'minute': 'хвилину', 'minutes': ['{0} хвилину', '{0} хвилини', '{0} хвилин'], 'month': 'місяць', 'months': ['{0} місяць', '{0} місяці', '{0} місяців'], 'now': 'зараз', 'seconds': 'кілька секунд', 'year': 'рік', 'years': ['{0} рік', '{0} роки', '{0} років']}
class arrow.locales.VietnameseLocale
day_abbreviations = ['', 'Thứ 2', 'Thứ 3', 'Thứ 4', 'Thứ 5', 'Thứ 6', 'Thứ 7', 'CN']
day_names = ['', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy', 'Chủ Nhật']
future = '{0} nữa'
month_abbreviations = ['', 'Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6', 'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12']
month_names = ['', 'Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu', 'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai']
names = ['vi', 'vi_vn']
past = '{0} trước'
timeframes = {'day': 'một ngày', 'days': '{0} ngày', 'hour': 'một giờ', 'hours': '{0} giờ', 'minute': 'một phút', 'minutes': '{0} phút', 'month': 'một tháng', 'months': '{0} tháng', 'now': 'hiện tại', 'seconds': 'giây', 'year': 'một năm', 'years': '{0} năm'}
arrow.locales.get_locale(name)

Returns an appropriate Locale corresponding to an inpute locale name.

Parameters

name – the name of the locale.