Skip to contents

This function provides a sequence (seq()) method for messydates. This can be used with ranges or unspecified dates, and is particularly useful for defining a sequence of dates before the common era or between eras.

Usage

# S3 method for class 'mdate'
seq(from, to, by = "days", ...)

Arguments

from

A messydate or range. If 'from' is a range and 'to' is not specified, 'from' will be the minimum of the range and 'to' will be maximum.

to

A messydate.

by

Increment of the sequence. By default "days".

...

Arguments passed to or from methods.

Examples

seq(mdate("-0001-12-20"), mdate("0001-01-10"))
#>  [1] "-0001-12-20" "-0001-12-21" "-0001-12-22" "-0001-12-23" "-0001-12-24"
#>  [6] "-0001-12-25" "-0001-12-26" "-0001-12-27" "-0001-12-28" "-0001-12-29"
#> [11] "-0001-12-30" "-0001-12-31" "0001-01-01"  "0001-01-02"  "0001-01-03" 
#> [16] "0001-01-04"  "0001-01-05"  "0001-01-06"  "0001-01-07"  "0001-01-08" 
#> [21] "0001-01-09"  "0001-01-10"