(date)
(date t)
(date lat lon)
(date lat lon t)
Return a map containing the details of a hebrew date
where:
lat
is the latitude of the location,
lon
is the longitude of the location, and
t
is a ZonedDateTime object representing the time for which the date
will
be calculated.
If only t
is provided lat
and lon
will default to the coordinates of
the Temple Mount in Jerusalem.
In addition, if only lat
, and lon
are provided t
will default to the
current time using the system timezone.
Example: (date 59.3325800 18.0649000 (in-zone "Europe/Stockholm" (now)))
The above will look for the current hebrew date. The coordinates are those of
Stockholm, Sweden. Using the in-zone
function to make sure that now
is
returned in the correct timezone is recommended, in this case
"Europe/Stockholm".
Caution: Make sure that t
is using the actual timezone of the location at
the provided coordinates. Otherwise the results may not even be produced, or
they will be inaccurate. Calculating the timezone of a given location is out
of scope of this library.
Return a map containing the details of a hebrew `date` where: `lat` is the latitude of the location, `lon` is the longitude of the location, and `t` is a ZonedDateTime object representing the time for which the `date` will be calculated. If only `t` is provided `lat` and `lon` will default to the coordinates of the Temple Mount in Jerusalem. In addition, if only `lat`, and `lon` are provided `t` will default to the current time using the system timezone. Example: (date 59.3325800 18.0649000 (in-zone "Europe/Stockholm" (now))) The above will look for the current hebrew date. The coordinates are those of Stockholm, Sweden. Using the `in-zone` function to make sure that `now` is returned in the correct timezone is recommended, in this case "Europe/Stockholm". Caution: Make sure that `t` is using the actual timezone of the location at the provided coordinates. Otherwise the results may not even be produced, or they will be inaccurate. Calculating the timezone of a given location is out of scope of this library. See also [[in-zone]], [[hebrew-date]], [[time-date]], and [[now]].
A map of pre-calculated feast days covering the years 2020-2039.
A map of pre-calculated feast days covering the years 2020-2039.
(go-back n unit t)
Subtract n
unit
from t
.
Example: (go-back 5 :hours (now))
Subtract `n` `unit` from `t`. Example: (go-back 5 :hours (now))
(go-forward n unit t)
Add n
unit
to t
.
Example: (go-forward 5 :hours (now))
Add `n` `unit` to `t`. Example: (go-forward 5 :hours (now))
(in-zone z t)
Given either a string or a ZoneRegion object z
, and a ZonedDateTime object
t
, convert t
to the same instant in z
.
Given either a string or a ZoneRegion object `z`, and a ZonedDateTime object `t`, convert `t` to the same instant in `z`.
The Latitude of the Temple Mount in Jerusalem, Israel.
The Latitude of the Temple Mount in Jerusalem, Israel.
The Longitude of the Temple Mount in Jerusalem, Israel.
The Longitude of the Temple Mount in Jerusalem, Israel.
A string representing the ZoneRegion of Jerusalem, Israel.
A string representing the ZoneRegion of Jerusalem, Israel.
(list-of-feast-days-in-year year)
Given a gregorian year
between 1584 and 2100, return a list of strings
describing the feast days in that year. The dates represent the gregorian day
on which the sunset would begin the feast day in question. Some days will have
more than one feast day.
Note: The years 2020-2039 are pre-calculated and defined in
feast-days
, which will be used for years that it contains. If the
year
is outside of this range there will be quite some computational time
added.
Given a gregorian `year` between 1584 and 2100, return a list of strings describing the feast days in that year. The dates represent the gregorian day on which the sunset would begin the feast day in question. Some days will have more than one feast day. Note: The years 2020-2039 are pre-calculated and defined in `feast-days`, which will be used for years that it contains. If the `year` is outside of this range there will be quite some computational time added.
(lookup-date m d)
(lookup-date m d t)
(lookup-date lat lon m d t)
Return a map containing the details of a date
where:
lat
is the latitude of the location,
lon
is the longitude of the location,
m
is the hebrew month of year,
d
is the hebrew day of month that you are looking for, and
t
is a ZonedDateTime object from which the beginning of the hebrew year will
be calculated. I.e, it will use the 'current' year of the t
as the base for
calculating m
and d
.
If only m
, d
, and t
are provided lat
and lon
will default to
the coordinates of the Temple Mount in Jerusalem.
In addition, if only m
, and d
is provided t
will default to the
current time in the "Asia/Jerusalem" timezone.
Example: (lookup-date 59.3325800 18.0649000 1 14 (in-zone "Europe/Stockholm" (now)))
The above will look for the 14th day of the 1st month in the hebrew year that
starts in the current gregorian year, based on the system time and timezone.
The coordinates are those of Stockholm, Sweden. Using the in-zone
function
to make sure that now
is returned in the correct timezone is recommended,
in this case "Europe/Stockholm".
Caution: Make sure that t
is using the actual timezone of the location at
the provided coordinates. Otherwise the results may not even be produced, or
they will be inaccurate. Calculating the timezone of a given location is out
of scope of this library.
Return a map containing the details of a `date` where: `lat` is the latitude of the location, `lon` is the longitude of the location, `m` is the hebrew month of year, `d` is the hebrew day of month that you are looking for, and `t` is a ZonedDateTime object from which the beginning of the hebrew year will be calculated. I.e, it will use the 'current' year of the `t` as the base for calculating `m` and `d`. If only `m`, `d`, and `t` are provided `lat` and `lon` will default to the coordinates of the Temple Mount in Jerusalem. In addition, if only `m`, and `d` is provided `t` will default to the current time in the "Asia/Jerusalem" timezone. Example: (lookup-date 59.3325800 18.0649000 1 14 (in-zone "Europe/Stockholm" (now))) The above will look for the 14th day of the 1st month in the hebrew year that starts in the current gregorian year, based on the system time and timezone. The coordinates are those of Stockholm, Sweden. Using the `in-zone` function to make sure that `now` is returned in the correct timezone is recommended, in this case "Europe/Stockholm". Caution: Make sure that `t` is using the actual timezone of the location at the provided coordinates. Otherwise the results may not even be produced, or they will be inaccurate. Calculating the timezone of a given location is out of scope of this library. See also [[date]], [[in-zone]], and [[now]].
(lookup-date-in-year y m d)
(lookup-date-in-year z y m d)
(lookup-date-in-year lat lon z y m d)
Return a map containing the details of a date
where:
lat
is the latitude of the location
lon
is the longitude of the location
z
is a string containing a valid TimeZone description
y
is the gregorian year in which the hebrew year in question starts
m
is the hebrew month of year, and
d
is the hebrew day of month that you are looking for.
If only z
, y
, m
, and d
are provided lat
and lon
will default to
the coordinates of the Temple Mount in Jerusalem.
In addition, if only y
, m
, and d
is provided z
will default to
"Asia/Jerusalem".
Example: (lookup-date-in-year 59.3325800 18.0649000 "Europe/Stockholm" 2025 1 14)
The above will look for the 14th day of the 1st month of the hebrew year that starts in the gregorian year 2025. The timezone in use will be "Europe/Stockholm" and the coordinates are those of Stockholm, Sweden.
Caution: Make sure that z
is the actual timezone of the location at the
provided coordinates. Otherwise the results may not even be produced, or they
will be inaccurate. Calculating the timezone of a given location is out of
scope of this library.
See also lookup-date
.
Return a map containing the details of a `date` where: `lat` is the latitude of the location `lon` is the longitude of the location `z` is a string containing a valid TimeZone description `y` is the gregorian year in which the hebrew year in question starts `m` is the hebrew month of year, and `d` is the hebrew day of month that you are looking for. If only `z`, `y`, `m`, and `d` are provided `lat` and `lon` will default to the coordinates of the Temple Mount in Jerusalem. In addition, if only `y`, `m`, and `d` is provided `z` will default to "Asia/Jerusalem". Example: (lookup-date-in-year 59.3325800 18.0649000 "Europe/Stockholm" 2025 1 14) The above will look for the 14th day of the 1st month of the hebrew year that starts in the gregorian year 2025. The timezone in use will be "Europe/Stockholm" and the coordinates are those of Stockholm, Sweden. Caution: Make sure that `z` is the actual timezone of the location at the provided coordinates. Otherwise the results may not even be produced, or they will be inaccurate. Calculating the timezone of a given location is out of scope of this library. See also [[lookup-date]].
(march-equinox-of y)
Given the year y
, return the time of the March Equinox of that year as a
java.time.ZonedDateTime object in UTC.
Given the year `y`, return the time of the March Equinox of that year as a java.time.ZonedDateTime object in UTC.
(new-moon t)
Given a ZonedDateTime object t
return an
org.shredzone.commons.suncalc.MoonPhase object describing the new moon
following t
using the same timezone as t
.
Example: (new-moon (zdt "Asia/Jerusalem" 2021 6 1 12))
Given a ZonedDateTime object `t` return an org.shredzone.commons.suncalc.MoonPhase object describing the new moon following `t` using the same timezone as `t`. Example: (new-moon (zdt "Asia/Jerusalem" 2021 6 1 12))
(next-new-moon t)
Given a ZonedDateTime object t
return a new ZonedDateTime object detailing
the time of the new moon following t
using the same timezone as t
.
See also new-moon
.
Example: (next-new-moon (zdt "Asia/Jerusalem" 2021 6 1 12))
Given a ZonedDateTime object `t` return a new ZonedDateTime object detailing the time of the new moon following `t` using the same timezone as `t`. See also [[new-moon]]. Example: (next-new-moon (zdt "Asia/Jerusalem" 2021 6 1 12))
(next-sunset lat lon t & {:keys [adjusted] :or {adjusted false}})
Given lat
and lon
for a location, and a ZonedDateTime object t
in the
timezone that corresponds to that location, return a map containing the next
sunset following t
.
If the sun is either always up or always down, the function will re-run with the latitude incremently adjusted to get closer to the equator until a sunset can be observed.
See also sun-events
.
Given `lat` and `lon` for a location, and a ZonedDateTime object `t` in the timezone that corresponds to that location, return a map containing the next sunset following `t`. If the sun is either always up or always down, the function will re-run with the latitude incremently adjusted to get closer to the equator until a sunset can be observed. See also [[sun-events]].
(now)
Return the current time using the system timezone.
Return the current time using the system timezone.
(sun-events lat lon t)
Given lat
and lon
for a location, and a ZonedDateTime object t
in the
timezone that corresponds to that location, return an
org.shredzone.commons.suncalc.SunTimes object describing the sun events
following t
.
Example: (sun-events 31 35 (zdt "Asia/Jerusalem" 2021 6 1 12))
Given `lat` and `lon` for a location, and a ZonedDateTime object `t` in the timezone that corresponds to that location, return an org.shredzone.commons.suncalc.SunTimes object describing the sun events following `t`. Example: (sun-events 31 35 (zdt "Asia/Jerusalem" 2021 6 1 12))
(utc-zdt & more)
Given at least 3 integers, return a ZonedDateTime object in the UTC timezone. Accepts between 3 and 7 arguments representing year, month, day, hour, minute, second, nanos.
Given at least 3 integers, return a ZonedDateTime object in the UTC timezone. Accepts between 3 and 7 arguments representing year, month, day, hour, minute, second, nanos.
(valid-zone? s)
Test if a string can be transformed into a valid ZoneRegion. Passing a ZoneRegion object will also return true.
Test if a string can be transformed into a valid ZoneRegion. Passing a ZoneRegion object will also return true.
(zdt z & more)
Given a string containing a valid timezone name z
, and at least 3 integers,
return a ZonedDateTime object. Accepts between 3 and 7 integer arguments
representing year, month, day, hour, minute, second, nanos.
Given a string containing a valid timezone name `z`, and at least 3 integers, return a ZonedDateTime object. Accepts between 3 and 7 integer arguments representing year, month, day, hour, minute, second, nanos.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close