Skip to main content

From a date given in parameter, the algorithm returns dates for the new moon ; the first quarter ; the full moon and the last quarter

Project description

Vous pouvez l’installer avec pip:

pip install lune

Utilisation :

>>> import lune
>>> lune.calcul_phase(year, month, day)
>>> lune.lunar_phase(year, month, day)

Exemples d’usage

>>> import lune
>>> lune.calcul_phase(1969, 5, 24)

([2440357.8560705725, 2440366.010817295, 2440373.0585508235, 2440379.6528647034], [‘1969/05/16’, ‘1969/05/24’, ‘1969/05/31’, ‘1969/06/07’])

>>> import lune
>>> lune.lunar_phase(1969, 5, 24)

(‘8.png’, ‘Premier quartier’)

python phase.py

The date display is in the form YYYY/MM/DD

Example with the date May 24, 1969

Date input = 1969/5/24

Date of the new moon = 1969/05/16

Date of the first quarter = 1969/05/24

Date of the full moon = 1969/05/31

Date of the last quarter = 1969/06/07

(‘8.png’, ‘Premier quartier’)

Example with today’s date

Date input = 2020/6/17

Date of the new moon = 2020/06/21

Date of the first quarter = 2020/06/28

Date of the full moon = 2020/07/05

Date of the last quarter = 2020/07/12

(‘26.png’, ‘’)

Ce code est sous licence WTFPL.

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

lune-1.6.4.tar.gz (367.0 kB view details)

Uploaded Source

Built Distributions

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

lune-1.6.4-py3.7.egg (405.9 kB view details)

Uploaded Egg

lune-1.6.4-py3-none-any.whl (401.7 kB view details)

Uploaded Python 3

File details

Details for the file lune-1.6.4.tar.gz.

File metadata

  • Download URL: lune-1.6.4.tar.gz
  • Upload date:
  • Size: 367.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3

File hashes

Hashes for lune-1.6.4.tar.gz
Algorithm Hash digest
SHA256 b88bbef74ca19105b96285bbee74686f9390dc88d9fb5458c5063d7d4caf9137
MD5 6b09dfb068159dba0572221878007a90
BLAKE2b-256 122062d1422601bc923ef6e408e7ab53fd0b9881c4a37ef35ffd2247723a7d45

See more details on using hashes here.

File details

Details for the file lune-1.6.4-py3.7.egg.

File metadata

  • Download URL: lune-1.6.4-py3.7.egg
  • Upload date:
  • Size: 405.9 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3

File hashes

Hashes for lune-1.6.4-py3.7.egg
Algorithm Hash digest
SHA256 538630a861c08e97983f519fe42ddc5f25a7cd960e9a7e350a4d08a9cec056bf
MD5 24cf8645fdfbbdd967382bc346c0adfc
BLAKE2b-256 d19903c76ace1fdd37f9ea0525039692f9134aac969eca7093ee925c778c9237

See more details on using hashes here.

File details

Details for the file lune-1.6.4-py3-none-any.whl.

File metadata

  • Download URL: lune-1.6.4-py3-none-any.whl
  • Upload date:
  • Size: 401.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3

File hashes

Hashes for lune-1.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4db36e8688225403ba9b6fd436b5eebcb2b1fb07508631873cf20ffc96713ff4
MD5 114e26de37df7decf99b6f26deb2ecb9
BLAKE2b-256 28faa93b95454e9fb784b23eeec61c28cfabdebc2629320966b8fc7b1ade28b8

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