Skip to contents

Insert Moon Phase Emoji

Usage

moon(date, day = day_in_synodic_cycle(date))

Arguments

date

a date

day

number of days since new moon

Value

a moon emoji

Details

This function is vectorized. If not supplied, day is calculated using the approximation of day_in_synodic_cycle, i.e the number of days since a known new moon modulo 29.530588853 days.

Examples

moon(Sys.Date())
#> [1] "🌗"

january <- as.Date("2021-01-01") + 0:30
moon(january)
#>  [1] "🌕" "🌕" "🌖" "🌖" "🌖" "🌗" "🌗" "🌗" "🌗" "🌘" "🌘" "🌘" "🌘" "🌑" "🌑"
#> [16] "🌑" "🌒" "🌒" "🌒" "🌒" "🌓" "🌓" "🌓" "🌓" "🌔" "🌔" "🌔" "🌔" "🌕" "🌕"
#> [31] "🌕"