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] 2459748JD to Gregorian
Convert Julian day number to Gregorian date
jd_to_gregorian(2459778)
#> $year
#> [1] 2022
#>
#> $month
#> [1] 7
#>
#> $day
#> [1] 17
#>
#> $hour
#> [1] 12Sun’s Longitude
Get Solar longitude for a given Julian day number.
sun_longitude(2459778)
#> [1] 114.91sun_longitude(gregorian_to_jd(17,6,2022))
#> [1] 85.815Moon’s Longitude
Get Lunar longitude for a given Julian day number.
moon_longitude(2459778)
#> [1] 346.57moon_longitude(gregorian_to_jd(17,6,2022))
#> [1] 301.41Sunrise
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 45jd <- 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 19Sunset
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 46jd <- 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 29Moonrise
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 24jd <- 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 18Moonset
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 46jd <- 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 55Panchang
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 35tithi(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] 18 6 11 26 19 26 59 58Tithi’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 1nakshatra(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] 21 9 56 11Nakshatra’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 12yoga(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] 26 17 17 57Yoga’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 40karana(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] 35 36Karana’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] 1vaara(gregorian_to_jd(6,8,2022))
#> [1] 7Vaara’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 0masa(gregorian_to_jd(17,6,2022),c(15.34, 75.13, +5.5))
#> [1] 3 0Masa’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] 2Ritu’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] 36Samvatsara’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] 3Raasi’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] 10Moonsign’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"