VedicDateTime

library(VedicDateTime)

Gregorian to JD

Convert Gregorian date to Julian day number at 00:00 UTC

gregorian_to_jd(17,6,2022) #In dd,mm,yyyy
#> [1] 2459748

JD to Gregorian

Convert Julian day number to Gregorian date

jd_to_gregorian(2459778)
#> $year
#> [1] 2022
#> 
#> $month
#> [1] 7
#> 
#> $day
#> [1] 17
#> 
#> $hour
#> [1] 12

Sun’s Longitude

Get Solar longitude for a given Julian day number.

sun_longitude(2459778)
#> [1] 114.91
sun_longitude(gregorian_to_jd(17,6,2022))
#> [1] 85.815

Moon’s Longitude

Get Lunar longitude for a given Julian day number.

moon_longitude(2459778)
#> [1] 346.57
moon_longitude(gregorian_to_jd(17,6,2022))
#> [1] 301.41

Sunrise

Sunrise for a given date and place.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
sunrise(jd,place)
#> [1] 2459779      18       8      45
jd <- gregorian_to_jd(17,6,2022) #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
sunrise(jd,place)
#> [1] 2459748       6       0      19

Sunset

Sunset for a given date and place.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
sunset(jd,place)
#> [1] 2459778       7       2      46
jd <- gregorian_to_jd(17,6,2022) #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
sunset(jd,place)
#> [1] 2459748      19       0      29

Moonrise

Moonrise for a given date and place.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
moonrise(jd,place)
#> [1] 10 26 24
jd <- gregorian_to_jd(17,6,2022) #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
moonrise(jd,place)
#> [1] 22 16 18

Moonset

Moonset for a given date and place.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
moonset(jd,place)
#> [1] 22 31 46
jd <- gregorian_to_jd(17,6,2022) #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
moonset(jd,place)
#> [1]  8 45 55

Panchang

Tithi

Tithi for given date and place.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
tithi(jd,place)
#> [1] 20 20 55 35
tithi(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] 18  6 11 26 19 26 59 58

Tithi’s name

Get name(s) of the Tithi for given Julian day number and place.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5)  #Latitude, Longitude and timezone of the location
get_tithi_name(jd,place)
#> [1] "Krishna paksha panchami till 20:55:35"
get_tithi_name(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] "Krishna paksha trititya till 6:11:26 & Krishna paksha chaturthi till 26:59:58"

Nakshatra

Nakshatra for given date and place.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5)  #Latitude, Longitude and timezone of the location
nakshatra(jd,place)
#> [1] 25 24 24  1
nakshatra(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] 21  9 56 11

Nakshatra’s name

Get name(s) of the Nakshatra for given Julian day number and place.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5)  #Latitude, Longitude and timezone of the location
get_nakshatra_name(jd,place)
#> [1] "Purvabhadrapada till 24:24:1"
get_nakshatra_name(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] "Uttarashada till 9:56:11"

Yoga

Yoga for given date and place.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5)  #Latitude, Longitude and timezone of the location
yoga(jd,place)
#> [1]  5 27 26 12
yoga(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] 26 17 17 57

Yoga’s name

Get name(s) of the Yoga for given Julian day number and place.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
get_yoga_name(jd,place)
#> [1] "Sobhana till 27:26:12"
get_yoga_name(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] "Indra till 17:17:57"

Karana

Karana for given date and place.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
karana(jd,place)
#> [1] 39 40
karana(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] 35 36

Karana’s name

Get name(s) of the Karana for given Julian day number and place.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
get_karana_name(jd,place)
#> [1] "Kaulava-Taitila"
get_karana_name(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] "Vanija-Visti"

Vaara

Vaara for a given Julian day number

vaara(2459778)
#> [1] 1
vaara(gregorian_to_jd(6,8,2022))
#> [1] 7

Vaara’s name

Get name of the Vaara for given Julian day number.

get_vaara_name(2459778)
#> [1] "Ravivara"
get_vaara_name(gregorian_to_jd(6,8,2022))
#> [1] "Shanivara"

Masa

Masa for a given place and time.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
masa(jd,place)
#> [1] 4 0
masa(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] 3 0

Masa’s name

Get name of the Masa for given Julian day number and place.

jd <- 2459778 #Julian day number
place <- c(15.34, 75.13, +5.5) #Latitude, Longitude and timezone of the location
get_masa_name(jd,place)
#> [1] "Ashada"
get_masa_name(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] "Jyeshtha"

Ritu

Returns the number associated with Ritu from a Masa.

masa_num <- masa(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))[1]
ritu(masa_num)
#> [1] 2

Ritu’s name

Returns Ritu’s name from a Masa.

masa_num <- masa(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))[1]
get_ritu_name(masa_num)
#> [1] "Grishma"

Samvatsara

Returns number associated with the name of the Shaka Samvatsar for a given Julian day number and maasa number.

jd <- gregorian_to_jd(17,6,2022) #Julian day number
masa_num <- masa(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))[1] #Number associated with the masa
samvatsara(jd,masa_num)
#> [1] 36

Samvatsara’s name

Returns the name of the Shaka Samvatsar for a given Julian day number and maasa number.

jd <- gregorian_to_jd(17,6,2022) #Julian day number
masa_num <- masa(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))[1] #Number associated with the masa
get_samvatsara_name(jd,masa_num)
#> [1] "Shubhakrit"

Raasi

Raasi(Sun-sign) for a given Julian day number

jd <- gregorian_to_jd(17,6,2022) #Julian day number
raasi(jd)
#> [1] 3

Raasi’s name

Gives name of the Raasi(Sun-sign) for a given Julian day number

jd <- gregorian_to_jd(17,6,2022) #Julian day number
get_raasi_name(jd)
#> [1] "Mithuna"

Moon-sign

Moonsign for a given Julian day number

jd <- gregorian_to_jd(17,6,2022) #Julian day number
moonsign(jd)
#> [1] 10

Moonsign’s name

Gives name of the moonsign for a given Julian day number

jd <- gregorian_to_jd(17,6,2022) #Julian day number
get_moonsign_name(jd)
#> [1] "Makara"