MoonPhase

MoonPhase[]

gives moon phase fraction of illumination for the current date.

MoonPhase[datespec]

gives moon phase fraction of illumination for the specified date.

MoonPhase[property]

gives the property of the moon phase for the current date.

MoonPhase[datespec,property]

gives the property of the moon phase for the specified date.

Details

  • The phase of the Moon, also known as the lunar phase, describes the fraction of the lunar surface illuminated by the Sun as seen from Earth.
  • MoonPhase[] makes use of $TimeZone to determine your time zone.
  • datespec can be a DateObject expression, a TimeObject expression, a date string or a {y,m,d,h,m,s} date list.
  • datespec is assumed to be in $TimeZone, unless it is a DateObject or TimeObject expression with an explicit TimeZone option value.
  • If datespec is a list of dates, then the results will contain EventSeries or TimeSeries objects.
  • datespec can be specified as {start,end,increment} for compatibility with DateRange specifications.
  • MoonPhase["Fraction"] is equivalent to MoonPhase[].
  • MoonPhase can accept the following values for property:
  • "Fraction"fraction of illumination
    "SignedFraction"signed fraction of illumination
    "Name"name of the moon phase
    "Icon"icon representing the moon phase

Examples

open allclose all

Basic Examples  (4)

Find the Moon's current fraction of illumination:

Find the Moon's fraction of illumination on a specified date:

Find the name of the Moon's current phase:

Generate an icon of the Moon's current phase:

Scope  (7)

Dates can be specified as a DateObject:

Dates can be specified as a date string:

Results for a range of dates:

Generalizations & Extensions  (1)

IconData can accept the signed fraction of the moon phase as its second argument:

Properties & Relations  (1)

By default, the date is specified by the current date:

Possible Issues  (1)

The names of moon phases are based on the illumination fraction value. On a given day, the name of the moon phase may change, depending on what time it is. For example, a full moon does not last a full day, so even if a full moon occurs on that day, you may have to change the time in order to get the phase you might expect:

Neat Examples  (1)

Create a moon calendar:

Wolfram Research (2014), MoonPhase, Wolfram Language function, https://reference.wolfram.com/language/ref/MoonPhase.html.

Text

Wolfram Research (2014), MoonPhase, Wolfram Language function, https://reference.wolfram.com/language/ref/MoonPhase.html.

CMS

Wolfram Language. 2014. "MoonPhase." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MoonPhase.html.

APA

Wolfram Language. (2014). MoonPhase. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MoonPhase.html

BibTeX

@misc{reference.wolfram_2023_moonphase, author="Wolfram Research", title="{MoonPhase}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/MoonPhase.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_moonphase, organization={Wolfram Research}, title={MoonPhase}, year={2014}, url={https://reference.wolfram.com/language/ref/MoonPhase.html}, note=[Accessed: 19-March-2024 ]}