Skip to content

Instantly share code, notes, and snippets.

@ijlyttle
Created February 18, 2013 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ijlyttle/4979446 to your computer and use it in GitHub Desktop.
Save ijlyttle/4979446 to your computer and use it in GitHub Desktop.
An illustration of the difference between a duration and a timespan
require("lubridate")
# in the USA, daylight-saving time begins for 2013 on 10 Mar.
dtm_start <- ymd("2013-03-10", tz="America/Chicago")
dtm_start
dtm_start + duration(1, "day")
dtm_start + days(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment