Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/babel/__pycache__/support.cpython-311.pyc
]jf 8 d Z ddlmZ ddlZddlZddlZddlZddlmZ ddl m
Z
mZmZ ddl
mZ ddlmZmZmZmZ ddlmZmZmZmZmZmZ e
rdd lmZ dd
lmZ G d d Z G d
d Z G d dej Z G d de ej! Z"dS )a-
babel.support
~~~~~~~~~~~~~
Several classes and functions that help with integrating and using Babel
in applications.
.. note: the code in this module is not used by Babel itself
:copyright: (c) 2013-2023 by the Babel Team.
:license: BSD, see LICENSE for more details.
)annotationsN)Iterator)
TYPE_CHECKINGAnyCallable)Locale)format_dateformat_datetimeformat_timeformat_timedelta)format_compact_currencyformat_compact_decimalformat_currencyformat_decimalformat_percentformat_scientific)Literal)_PredefinedTimeFormatc e Zd ZdZd6d7d Z d8d9dZ d8d:dZ d8d;dZ d<d=d#Zd>d&Z d6d?d(Z
d@dAd/ZdBd1Z d@dCd3Z
d6d?d4Zd>d5ZdS )DFormataC Wrapper class providing the various date and number formatting functions
bound to a specific locale and time-zone.
>>> from babel.util import UTC
>>> from datetime import date
>>> fmt = Format('en_US', UTC)
>>> fmt.date(date(2007, 4, 1))
u'Apr 1, 2007'
>>> fmt.decimal(1.2345)
u'1.234'
NlocaleLocale | strtzinfodatetime.tzinfo | NonereturnNonec F t j | | _ || _ dS )zInitialize the formatter.
:param locale: the locale identifier or `Locale` instance
:param tzinfo: the time-zone info (a `tzinfo` instance or `None`)
N)r parser r )selfr r s m/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/babel/support.py__init__zFormat.__init__4 s l6** mediumdatedatetime.date | Noneformat_PredefinedTimeFormat | strstrc 0 t ||| j S )zReturn a date formatted according to the given pattern.
>>> from datetime import date
>>> fmt = Format('en_US')
>>> fmt.date(date(2007, 4, 1))
u'Apr 1, 2007'
r )r r )r r$ r&