Skip to main content

Package made to format date & time strings for use in various SQL RDBMS

Project description

pydate

A Python package made to format date & time strings for use in various SQL RDBMS.

Make sure to have the latest version of Python 3 installed although this should work with previous versions.

To install the package with pip enter command in terminal: pip install pydate

To uninstall the package with pip enter command in terminal: pip uninstall pydate


Module Year

year: Attribute of the int type representing a year. The attribute must be 4 digits.

get_year(): Return the year attribute value.

set_year(year): Change the year attribute value.

set_year_UTC(): Change the year attribute to the current UTC year.

tostring(): Return a string representing the Year class attribute values.


Module Date

Note: This class inherits the attributes/methods of the Year class.

month: Attribute of the int type representing a month. The attribute's value must be between 1 & 12.

day: Attribute of the int type representing a day. The attribute's value must be between 1 & 31.

get_month(): Return the month attribute value.

get_day(): Return the day attribute value.

get_gregorian(): Return the Gregorian month name.

set_month(month): Change the month attribute value.

set_month_UTC(): Change the month attribute to the current UTC month.

set_day(day): Change the day attribute value.

set_day_UTC(): Change the day attribute to the current UTC day.

tostring(): Return a string representing the Date class attribute values.


Module Time

hour: Attribute of the int type representing a hour. The attribute's value must be between 0 & 23.

minute: Attribute of the int type representing a minute. The attribute's value must be between 0 & 59.

second: Attribute of the int type representing a second. The attribute's value must be between 0 & 59.

get_hour(): Return the hour attribute value.

get_minute(): Return the minute attribute value.

get_second(): Return the second attribute value.

set_hour(hour): Change the hour attribute value.

set_hour_UTC(): Change the hour attribute to the current UTC hour.

set_minute(minute): Change the minute attribute value.

set_minute_UTC(): Change the minute attribute to the current UTC minute.

set_second(second): Change the second attribute value.

set_second_UTC(): Change the second attribute to the current UTC second.

tostring(): Return a string representing the Time class attribute values.


Module DateTime

Note: This class inherits the attributes/methods of both the Date & Time classes.

set_UTC(): Change year, month, day, hour, minute, and second attributes to current UTC values.

tostring(): Return a string representing the DateTime class attribute values.

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

pydate-1.1.2.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file pydate-1.1.2.tar.gz.

File metadata

  • Download URL: pydate-1.1.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2

File hashes

Hashes for pydate-1.1.2.tar.gz
Algorithm Hash digest
SHA256 d0026d6bd5a23d179e43ef535f1146d1453e313e6a435ddbd2d08e11e727475a
MD5 7d0b17cf0ee5d01f24932dc60c9f36ae
BLAKE2b-256 b1eea332ba56fc9062e1aca8690bfed014dec69b6eee3837ba147cf27ddf6759

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