Skip to main content

Get timestamp, formatted date, and perform date/time operations.

Project description

sometime

Get timestamp, formatted date, and perform date/time operations.

from sometime.sometime import Sometime

date = Sometime()
print(date.timestamp())

# access dictionary
moment = date.moment()

# to add/subtract, set parameter to any positive/negative integer
date.year(1) # month(), day(), hour(), minute(), second()
print(date.year())

# custom date increments / decrements
# date.add(years=0, months=0, days=0, hours=0, minutes=0, seconds=0)
date.add(years=5, months=1, days=7)
date.add(hours=1, minutes=30)
date.add(minutes=1, seconds=25)

# Name of Month e.g. November
print(date.name_of_month()) 

# Day of Week e.g. Monday
print(date.day_of_week()) 

# AM / PM
print(date.period())

# Custom date formats
print(date.("%Y-%m-%d %H:%M:$S"))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sometime-1.0.5.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sometime-1.0.5-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file sometime-1.0.5.tar.gz.

File metadata

  • Download URL: sometime-1.0.5.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.0

File hashes

Hashes for sometime-1.0.5.tar.gz
Algorithm Hash digest
SHA256 f0119514fbe4511d743732c921584e5a49a8e0e71588a215b5cae6036d03b9e8
MD5 92ccf5a865f8136ea2b09b06b29ce4dd
BLAKE2b-256 10d5d1d8b3a701e41e9838c254005913f96635601a61ab03789ea987bae8e50d

See more details on using hashes here.

File details

Details for the file sometime-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: sometime-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.0

File hashes

Hashes for sometime-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f0d24171c5bbaa24fa6ec1d89dc78e753ba8fdc0c844e870113ea5e078acf19a
MD5 e997809cd36a94dbf7b7e7a99b779805
BLAKE2b-256 33d3bab9fde6cc0c6653ae86d2791a6f3f55812fc6fcb2918e362edfeb3dbb9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page