Skip to main content

Brazilian daylight saving time

Project description

Um simples calculador das datas de início e fim do horário de verão brasileiro a partir de um ano especificado.

Instalando

pip install pybrdst

Como usar

Obtendo o início e fim do horário de verão:

from pybrdst.pybrdst import PyBrDST
dst = PyBrDST()
start, end = dst.get_dst(2017)
print(start)
2017-10-15 00:00:00
print(end)
2018-02-18 00:00:00

Obtendo somente o início do horário de verão:

from pybrdst.pybrdst import PyBrDST
dst = PyBrDST()
start = dst.begin_dst(2017)
print(start)
2017-10-15 00:00:00

Obtendo somente o fim do horário de verão:

Observe que a data informada será o fim que ocorreu ou ocorrerá no ano informado e não no ano seguinte

from pybrdst.pybrdst import PyBrDST
dst = PyBrDST()
end = dst.end_dst(2017)
print(end)
2017-02-19 00:00:00

Obtendo a data da Páscoa:

from pybrdst.pybrdst import PyBrDST
dst = PyBrDST()
easter_date = dst.easter_date(2017)
print(easter_date)
2017-04-16 00:00:00

Obtendo a data do carnaval:

from pybrdst.pybrdst import PyBrDST
dst = PyBrDST()
carnival_date = dst.carnival_date(dst.easter_date(2017))
print(carnival_date)
2017-02-28 00:00:00

Todos os retornos são do tipo datetime.datetime

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

pybrdst-0.1.tar.gz (1.6 kB view details)

Uploaded Source

Built Distributions

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

pybrdst-0.1-py2.py3-none-any.whl (3.1 kB view details)

Uploaded Python 2Python 3

pybrdst-0.1-py2-none-any.whl (2.9 kB view details)

Uploaded Python 2

File details

Details for the file pybrdst-0.1.tar.gz.

File metadata

  • Download URL: pybrdst-0.1.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pybrdst-0.1.tar.gz
Algorithm Hash digest
SHA256 e220fb96a144cd0616841f17db6de03147c7ef06f1e85e2749322d35a36bf755
MD5 8df4df8248f7b88169c15cb6fa248d36
BLAKE2b-256 6f28debca1a5e1aa70e67fb4e4034570793eae474837c81df672b889b4880902

See more details on using hashes here.

File details

Details for the file pybrdst-0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pybrdst-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8cf4e14ac11a2e8267d422c2b0bb32dbad8f12091d65e52bec3eab0f96b0e8fc
MD5 2a4deae22afce456599d15d5ffd338eb
BLAKE2b-256 7ed7c6600ff5c494370803e2ea2cbef6739c387e8c69d083c18844e7f1977bec

See more details on using hashes here.

File details

Details for the file pybrdst-0.1-py2-none-any.whl.

File metadata

File hashes

Hashes for pybrdst-0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 a9351f51fe89eecf5c780e9540d819dc95b26c67fac67cca32ea05791cc55313
MD5 fafd1066f1b5faf4e39aacae339aaf7a
BLAKE2b-256 8881459e8eb11aa84a2b8f33c4b91b523e55816c93fdb58247e79609375357b6

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