datetime_as_turtle_date: Calculate the "turtle date" from a given datetime

View source: R/datetime_as_turtle_date.R

datetime_as_turtle_dateR Documentation

Calculate the "turtle date" from a given datetime

Description

\lifecycle

stable

Usage

datetime_as_turtle_date(datetime)

Arguments

datetime

(dttm) A datetime

Details

Return the actual date for afternoon and evening datetimes (noon to midnight) or the date of the previous day for morning datetimes (midnight to noon). The turtle date keeps observations made between sunset and sunrise, as well as the "morning after" together by assigning the date of the start of observations.

In practice, the turtle date is the date component (year, month, day) of the datetime minus 12 hours.

This date convention is widely used in the turtle research community.

Value

A POSIXct date

See Also

Other helpers: absolute_angle(), add_dates(), datetime_as_isoweek(), datetime_as_seasonweek(), datetime_as_season(), exclude_training_species(), exclude_training_surveys(), extract_possibly(), fdate_as_tdate(), filter_missing_site(), filter_missing_survey(), filter_surveys_missing_end(), filter_surveys_requiring_qa(), filter_wastd_season(), get_more(), gj_linestring_to_st_linestring(), httpdate_as_gmt08_turtle_date(), httpdate_as_gmt08(), httpdate_as_season(), humanize(), join_tsc_sites(), leaflet_basemap(), map_chr_hack(), mean_bearing(), mis_bearing(), odkc_works(), read_table(), sentencecase(), sf_as_tbl(), tdate_as_fdate(), tracks_as_geojson(), tun(), urlize(), verify_odkc_turtledata(), verify_wamtram_data(), verify_wastd_data(), wastd_works(), wastdr_msg_abort(), wastdr_msg_info(), wastdr_msg_noop(), wastdr_msg_success(), wastdr_msg_warn(), wastdr_settings(), wastdr_setup()

Examples

# noon AWST is turtle date "2016-11-20":
datetime_as_turtle_date(
  httpdate_as_gmt08("2016-11-20T04:00:00Z")
)

# 1 sec before noon AWST is turtle date "2016-11-19":
datetime_as_turtle_date(
  httpdate_as_gmt08_turtle_date("2016-11-20T03:59:59Z")
)

parksandwildlife/wastdr documentation built on Nov. 17, 2022, 4:52 p.m.