-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
44 lines (35 loc) · 1.87 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
This script relies on nothing but core Perl modules and is able to
tell you about solstices and equinoxes in local time from 2000 through
2037. It assumes you are in the Northern hemisphere.
Usage: sonox [OPTIONS]
If no OPTIONS, defaults to --since.
-h, --help This text.
-N, --northern Assume Northern hemisphere rather than Southern. (default)
-S, --southern Assume Southern hemisphere rather than Northern.
-s, --since Show number of days since last solstice or equinox.
-u, --until Show number of days until next solstice or equinox.
-l, --last[=N]* Show last N solstices and equinoxes.
-n, --next[=N]* Show next N solstices and equinoxes.
-y, --year[=Y]** Show all 4 solstices and equinoxes for the year Y.
* N defaults to 1.
** Y defaults to the current year.
Northern hemisphere is the default unless the SONOX_SOUTHERN environment
variable is set to 1.
I've written several scripts to combine astronomical calculations with
calendrical and come up with local times for the equinoxes, solstices,
cross-quarter days, etc. But they end up being very non-portable
because of huge library dependencies.
I wanted a script I could run anywhere that could at least tell me
some basic info about the current time and its relation to the
seasons. It finally dawned on me that if I didn't try to do astro
calculations, it would be pretty easy in Perl with core modules.
TODO
- Expand the data set.
- A little testing wouldn't hurt.
- Option to install w/ symlink would make updating easier.
- Support setting both -l and -n... -u and -s already work together, but why not
both -l and -n?
- Detect not just when @$after is empty, but also when the last element of
@$before is > 100 days old (strong signal the results are bogus)
- Bounds checking in the rest of the code.
- A little less Perl cleverness.