++ed by:
Author image Tom Wyant
and 1 contributors


almanac - Generate almanac data for a given location


 almanac       # The White House by default
 almanac 52.07 4.29 4   # The Hague
 almanac -help
 almanac -version



This option specifies the date as a string that can be parsed by Date::Manip. If Date::Manip can not be loaded an error occurs. If this option is specified, -tomorrow is ignored.


This option specifies the strftime format used to display dates and times. The default is '%d-%b-%Y %H:%M:%S'.


This option displays the documentation for this script. The script then exits.


Display data for the Moon. Defaults to -nomoon if -sun is asserted.


Display data for the Sun. Defaults to -nosun if -moon is asserted.


Display data for tomorrow, rather than today.


This option displays the version of this script. The script then exits.


This Perl script displays today's almanac for the position given on the command line, in latitude north of the Equator, longitude east of the prime meridian, and meters above sea level. If no position is given on the command line, the contents of environment variable ALMANAC_POSITION are broken on spaces and used as the posiiton. If this environment variable is not found, the position of the White House in Washington DC USA is used.

By default, data for both the Sun and Moon are displayed. If you explicitly assert either -sun or -moon, only the selected luminary will be displayed.

You can look a day ahead by specifying -tomorrow.

The format of the time output can be specified using the -format option.


Thomas R. Wyant, III wyant at cpan dot org


Copyright (C) 2012-2021 by Thomas R. Wyant, III

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.