Metadata-Version: 2.1
Name: StringC
Version: 0.0.4
Summary: This Package Convert numeric date in the string to the datetime object
Home-page: https://bitbucket.org/mvahid/stringc.git
Author: Mohammad Vahid
Author-email: m.vahid.da@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: Persian
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing
Classifier: Topic :: Text Editors :: Text Processing
Description-Content-Type: text/markdown
Requires-Dist: persiantools (~=2.1.1)
Requires-Dist: python-dateutil (~=2.8.1)
Requires-Dist: regex (~=2021.3.17)
Requires-Dist: Unidecode (~=1.2.0)
Provides-Extra: dev
Requires-Dist: pytest (>=3.7) ; extra == 'dev'
Requires-Dist: twine (>=3.4.1) ; extra == 'dev'
Requires-Dist: check-manifest (>=0.46) ; extra == 'dev'

# StringC

This Package inherits from str Class 
Attributes:
    Any string

# Example:
##string = StringC("تاریخ برعکس ۱۳۹۹-۱۱-۳۰ تاریخ میلادی 1999/03/02 و تاریخ میلادی برعکس 05/12/95 حروف عربی مثل
كيك ۱۳۹۹/۱۱/۳۰ تاریخ")
##string.convert
# Output:
"تاریخ برعکس 1399-11-30 تاریخ میلادی 1999/03/02 و تاریخ میلادی برعکس 05/12/95 حروف عربی مثل کیک 1399/11/30 تاریخ"
# dates method
##:param content: str
##:return: list of datetime object

#At the beginning :
##-Any Number in string will convert to En string Number -Any Arabic Character in string will convert to Farsi

##For now, it just finds dates in numeric formats which are separated with characters like "-" or "/" or "."
There is no difference if date is Jalali or Gregorian or Characters are Fa or Ar, this function convert date to
Gregorian datetime object

# Example:
##from StringC import StringC

##string = "Today is 1400/01/18"
##type(StringC.dates(string))
##type(StringC.dates(string)[0])
##StringC.dates(string)
# Output:
##<class 'list'>
##<class 'datetime.datetime'>
##[datetime.datetime(2021, 4, 7, 0, 0)]
# Example:
##string = "today is 2021/04/05"
# Output:
##[datetime.datetime(2021, 4, 5, 0, 0)]
# Example:
##string = "today is 2021/04/07 and Today is 1400/01/18 yesterday was 17/01/1400 yesterday also was 06/04/2021"
# Output:
##[
##datetime.datetime(2021, 4, 7, 0, 0), datetime.datetime(2021, 4, 7, 0, 0), datetime.datetime(2021, 4, 6, 0, 0), datetime.datetime(2021, 4, 6, 0, 0)
##]


