This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A set of functions related with dates

Installation

Install via pip

pip install t77_date

datetime module

start_of_day

Return a new datetime with values that represent a start of a day.

Example

>>> dt = datetime(2016, 7, 2, 21, 49, 12)
>>> sod = start_of_day(dt)
>>> print(sod)
2016-07-02 00:00:00

end_of_day

Return a new datetime with values that represent a end of a day.

Example

>>> dt = datetime(2016, 7, 2, 21, 49, 12)
>>> eod = end_of_day(now)
>>> print(eod)
2016-07-02 23:59:59.999999

start_of_month

Return a new datetime with values that represent a start of a month.

Example

>>> dt = datetime(2016, 7, 2, 21, 49, 12)
>>> som = start_of_month(dt)
>>> print(som)
2016-07-01 00:00:00

end_of_month

Return a new datetime with values that represent a end of a month.

Example

>>> dt = datetime(2016, 7, 2, 21, 49, 12)
>>> eom = end_of_day(now)
>>> print(eom)
2016-07-31 23:59:59.999999

set_next_week_day

Set week day. New date will be greater or equal than input date.

Example

>>> saturday = datetime(2016, 7, 2, 21, 49, 12)
>>> next_friday = set_next_week_day(saturday, ISO_FRIDAY, iso=True)
>>> print(next_friday)
2016-07-08 21:49:12
>>> next_friday = set_next_week_day(saturday, FRIDAY, iso=False)
>>> print(next_friday)
2016-07-08 21:49:12

set_prev_week_day

Set week day. New date will be less or equal than input date.

Example

>>> saturday = datetime(2016, 7, 2, 12)
>>> prev_friday = set_prev_week_day(saturday, ISO_FRIDAY, iso=True)
>>> print(prev_friday)
2016-07-01 21:49:12
>>> prev_friday = set_prev_week_day(saturday, FRIDAY, iso=False)
>>> print(prev_friday)
2016-07-01 21:49:12
Release History

Release History

0.5.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
t77_date-0.5.0-py2.py3-none-any.whl (6.0 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Dec 7, 2016
t77-date-0.5.0.tar.gz (3.9 kB) Copy SHA256 Checksum SHA256 Source Dec 7, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting