Skip to main content

Gajula Package consists of useful utilites and functions

Project description

This is a package comes with general utilities and functions

timeutils functions:

****today**: returns today date object or string**

**time** : returns time in given timezone in object or string

**now**: returns local TS in desired format object, string, UNIX

**utcnow**: same as now but in UTC

**tznow**: same as above but given timezone

**str_to_date**: takes string and returns date object

**str_to_time**: takes string and returns time object

**to_datetime**: takes string or UNIX and returns TS object

**to_unix**: takes string or TS object and returns UNIX TS

**change_tz**: takes string or UNIX or TS object and changes to desired timezone
            String -> string
            TS object -> TS object
            UNIX -> UNIX

**second_now**: returns current second in the day

**today_midnight**: returns today midnight TS object

**time_btw**: takes 2 timestamps returns time gap (secs, minutes, hours, days, weeks)

**ts_from_now**:(-past and +future ) takes timestamp and gives next timestamp 
            in given weeks, days, hours, minutes, secs

**weekdays_btw**: takes 2 dates and returns weekday (monday,sunday,3,4) Monday = 0

**weekends_btw**: takes 2 dates and returns weekends in between

**workdays_btw**: takes 2 dates and returns working days between 
**ALL THREE above support string or date object.**

**random_ts**: returns random timestamp in future or past

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

gajula-0.0.20.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

gajula-0.0.20-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file gajula-0.0.20.tar.gz.

File metadata

  • Download URL: gajula-0.0.20.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.15

File hashes

Hashes for gajula-0.0.20.tar.gz
Algorithm Hash digest
SHA256 57ed9d5f6a541ec3f40ca82ad43cfc637b2e1548293b57feadba42f7866e4846
MD5 6403dceb35a2912374601ea5f0d7d395
BLAKE2b-256 84fc3b764504c07c65152c6f407ee3e2b5f8a1e1c05a3788560eed6c92b71cc2

See more details on using hashes here.

File details

Details for the file gajula-0.0.20-py3-none-any.whl.

File metadata

  • Download URL: gajula-0.0.20-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.15

File hashes

Hashes for gajula-0.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 fe01571c1543c0c1addfbfb3af634c958eaadad00caf63a7c78146adfd82ffa7
MD5 7172b33529e66b7a0c473aa23897211e
BLAKE2b-256 b20889c869d746f8affb258aaa9ac772030a8e44baf94a3dba2619f08822a079

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