(calculate-sun-events lat lon date)
Given lat
and lon
for a location, and a java.time.ZonedDateTime object
date
in the timezone that corresponds to that location, return an
org.shredzone.commons.suncalc.SunTimes object describing the sun events
following date
.
See also tz?
.
Example: (31.7781161 35.233804 (make-zoned-date "Asia/Jerusalem" 2021 6 1 12))
Given `lat` and `lon` for a location, and a java.time.ZonedDateTime object `date` in the timezone that corresponds to that location, return an org.shredzone.commons.suncalc.SunTimes object describing the sun events following `date`. See also `tz?`. Example: (31.7781161 35.233804 (make-zoned-date "Asia/Jerusalem" 2021 6 1 12))
A map of pre-calculated feast days covering the years 2020-2039.
A map of pre-calculated feast days covering the years 2020-2039.
(find-date m d)
(find-date m d date)
(find-date lat lon m d date)
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,
m
is the hebrew month of year,
d
is the hebrew day of month that you are looking for, and
date
is a java.time.ZonedDateTime object from which the beginning of the
hebrew year will be calculated. I.e, it will use the 'current' year of the
date
as the base for calculating m
and d
.
If only m
, d
, and date
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 date
will default to the
current time in the "Asia/Jerusalem" timezone.
Example: (find-date 59.3325800 18.0649000 1 14 (zone-it "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 zone-it
function
to make sure that now
is returned in the correct timezone is recommended,
in this case "Europe/Stockholm".
Caution: Make sure that date
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 hebrew-date
, zone-it
, and now
.
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, `m` is the hebrew month of year, `d` is the hebrew day of month that you are looking for, and `date` is a java.time.ZonedDateTime object from which the beginning of the hebrew year will be calculated. I.e, it will use the 'current' year of the `date` as the base for calculating `m` and `d`. If only `m`, `d`, and `date` 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 `date` will default to the current time in the "Asia/Jerusalem" timezone. Example: (find-date 59.3325800 18.0649000 1 14 (zone-it "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 `zone-it` function to make sure that `now` is returned in the correct timezone is recommended, in this case "Europe/Stockholm". Caution: Make sure that `date` 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 `hebrew-date`, `zone-it`, and `now`.
(find-date-in-year y m d)
(find-date-in-year tz y m d)
(find-date-in-year lat lon tz y m d)
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
tz
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 tz
, 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 tz
will default to
"Asia/Jerusalem".
Example: (find-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 tz
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 find-date
.
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 `tz` 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 `tz`, `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 `tz` will default to "Asia/Jerusalem". Example: (find-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 `tz` 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 `find-date`.
(go-back adjustment date)
Subtract adjustment
from date
.
Example: (go-back (t/hours 1) (now))
Subtract `adjustment` from `date`. Example: (go-back (t/hours 1) (now))
(go-forward adjustment date)
Add adjustment
to date
.
Example: (go-forward (t/hours 1) (now))
Add `adjustment` to `date`. Example: (go-forward (t/hours 1) (now))
(hebrew-date)
(hebrew-date date)
(hebrew-date lat lon)
(hebrew-date lat lon date)
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
date
is a java.time.ZonedDateTime object from which the beginning of the
hebrew year will be calculated. I.e, it will use the 'current' year of the
date
as the base for calculating m
and d
.
If only date
is provided lat
and lon
will default to the coordinates of
the Temple Mount in Jerusalem.
In addition, if only lat
, and lon
is provided date
will default to the
current time in the "Asia/Jerusalem" timezone.
Example: (hebrew-date 59.3325800 18.0649000 (zone-it "Europe/Stockholm" (now)))
The above will look for the current hebrew date. The coordinates are those of
Stockholm, Sweden. Using the zone-it
function to make sure that now
is
returned in the correct timezone is recommended, in this case
"Europe/Stockholm".
Caution: Make sure that date
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 zone-it
, hebrew-date-map
, hebrew-time-map
, and now
.
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 `date` is a java.time.ZonedDateTime object from which the beginning of the hebrew year will be calculated. I.e, it will use the 'current' year of the `date` as the base for calculating `m` and `d`. If only `date` is provided `lat` and `lon` will default to the coordinates of the Temple Mount in Jerusalem. In addition, if only `lat`, and `lon` is provided `date` will default to the current time in the "Asia/Jerusalem" timezone. Example: (hebrew-date 59.3325800 18.0649000 (zone-it "Europe/Stockholm" (now))) The above will look for the current hebrew date. The coordinates are those of Stockholm, Sweden. Using the `zone-it` function to make sure that `now` is returned in the correct timezone is recommended, in this case "Europe/Stockholm". Caution: Make sure that `date` 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 `zone-it`, `hebrew-date-map`, `hebrew-time-map`, and `now`.
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-known-feast-days-in-gregorian-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.
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.
(make-utc-date & args)
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.
(make-zoned-date tz & args)
Given a string containing a valid timezone name tz
, 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 `tz`, and at least 3 integers, return a ZonedDateTime object. Accepts between 3 and 7 integer arguments representing year, month, day, hour, minute, second, nanos.
(next-sunset lat lon date & {:keys [adjusted] :or {adjusted false}})
Given lat
and lon
for a location, and a java.time.ZonedDateTime object
date
in the timezone that corresponds to that location, return a map
containing the next following sunset for that date.
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 calculate-sun-events
.
Given `lat` and `lon` for a location, and a java.time.ZonedDateTime object `date` in the timezone that corresponds to that location, return a map containing the next following sunset for that date. 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 `calculate-sun-events`.
(now)
Return the current time using the system timezone.
Return the current time using the system timezone.
(time-of-march-equinox year)
Given an integer year
, return the time of the March Equinox of that year as
a java.time.ZonedDateTime object in UTC.
Given an integer `year`, return the time of the March Equinox of that year as a java.time.ZonedDateTime object in UTC.
(tz? date)
Return the java.time.ZoneRegion of java.time.ZonedDateTime object date
.
Return the java.time.ZoneRegion of java.time.ZonedDateTime object `date`.
(valid-zone-id? s)
Given a string s
, test if it can be transformed into a valid
java.time.ZoneRegion. Passing a java-time.ZoneRegion object will also return
true.
Given a string `s`, test if it can be transformed into a valid java.time.ZoneRegion. Passing a java-time.ZoneRegion object will also return true.
(zone-it tz date)
Given a valid timezone tz
(either a string or a java.time.ZoneRegion
object), and a java.time.ZonedDateTime object date
, convert date
to the
same instant in tz
.
Given a valid timezone `tz` (either a string or a java.time.ZoneRegion object), and a java.time.ZonedDateTime object `date`, convert `date` to the same instant in `tz`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close