Skip to main content

Lubridate: Date and Time Processing

  • Chapter
  • First Online:
CRAN Recipes
  • 562 Accesses

Abstract

Lubridate starts out answering a simple question—is it AM or PM, based on a date and hour? From there, it gets more complex but maintains a consistent approach to working with dates, times, and the combination date-times.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    www.rdocumentation.org/packages/lubridate/versions/1.5.6/topics/int_shift. Accessed on January 22, 2021.

  2. 2.

    Private correspondence with Michael Torbett, retired professor of astronomy at Macon State University. January 30, 2021.

  3. 3.

    “Working with Dates and Time in R Using the Lubridate Package | University of Virginia Library Research Data Services + Sciences,” accessed on January 22, 2021, https://data.library.virginia.edu/working-with-dates-and-time-in-r-using-the-lubridate-package/.

  4. 4.

    https://cran.r-project.org/web/packages/lubridate/lubridate.pdf, 57. Accessed on January 22, 2021.

  5. 5.

    “Interval Function | R Documentation,” accessed on January 22, 2021, www.rdocumentation.org/packages/lubridate/versions/1.7.4/topics/interval.

  6. 6.

    According to Wikipedia.org, “A week is defined as an interval of exactly seven days,[b] so that technically, except at daylight saving time transitions or leap seconds, 1 week = 7 days = 168 hours = 10,080 minutes = 604,800 seconds.” <EmphasisFontCategory=”NonProportional”>https://en.wikipedia.org/wiki/Week</Emphasis>, accessed on January 22, 2021.

  7. 7.

    This reminds me of the Latin term “novus ordo seclorum,” which is printed on the back of a US one dollar bill. It means “a new order of the ages.” Apparently, the R designers considered their new order date as January 1, 1970.

  8. 8.

    “Coordinated Universal Time,” in Wikipedia, January 19, 2021, https://en.wikipedia.org/w/index.php?title=Coordinated_Universal_Time&oldid=1001289270.

  9. 9.

    “Guess_formats + R + Lubridate,” Stack Overflow, accessed on January 22, 2021, https://stackoverflow.com/questions/26064292/guess-formats-r-lubridate.

  10. 10.

    “Ms Function | R Documentation,” accessed on January 23, 2021, www.rdocumentation.org/packages/lubridate/versions/1.7.9.2/topics/ms.

  11. 11.

    https://cran.r-project.org/web/packages/lubridate/lubridate.pdf. Accessed on January 25, 2021.

  12. 12.

    “Php – List of All Locales and Their Short Codes? – Stack Overflow,” accessed on January 24, 2021, https://stackoverflow.com/questions/3191664/list-of-all-locales-and-their-short-codes.

  13. 13.

    https://cran.r-project.org/web/packages/lubridate/lubridate.pdf. Accessed on January 24, 2021.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2021 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Yarberry, W. (2021). Lubridate: Date and Time Processing. In: CRAN Recipes. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-6876-6_3

Download citation

Publish with us

Policies and ethics