Skip to content

Commit

Permalink
Refactor to R6
Browse files Browse the repository at this point in the history
  • Loading branch information
pvanlaake committed Dec 11, 2024
1 parent 3d4ba67 commit ac5daa4
Show file tree
Hide file tree
Showing 68 changed files with 5,873 additions and 3,165 deletions.
18 changes: 16 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,30 @@ Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Imports:
methods,
utils
lubridate
Suggests:
knitr,
rmarkdown,
ncdf4,
ncdfCF,
RNetCDF,
testthat (>= 3.0.0),
stringr
URL: https://github.com/pvanlaake/CFtime
BugReports: https://github.com/pvanlaake/CFtime/issues
VignetteBuilder: knitr
Config/testthat/edition: 3
Collate:
'api.R'
'CFCalendar.R'
'CFCalendar360.R'
'CFCalendar365.R'
'CFCalendar366.R'
'CFCalendarJulian.R'
'CFCalendarProleptic.R'
'CFCalendarStandard.R'
'CFtime-package.R'
'CFtime.R'
'deprecated.R'
'helpers.R'
'zzz.R'
31 changes: 17 additions & 14 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
# Generated by roxygen2: do not edit by hand

S3method(str,CFdatum)
S3method("+",CFTime)
S3method("==",CFTime)
S3method(as.character,CFTime)
S3method(cut,CFTime)
S3method(length,CFTime)
S3method(range,CFTime)
export("bounds<-")
export(CFTime)
export(CFcomplete)
export(CFdatum)
export(CFfactor)
export(CFfactor_coverage)
export(CFfactor_units)
export(CFmonth_days)
export(CFparse)
export(CFsubset)
export(CFtime)
export(CFtimestamp)
export(as_timestamp)
export(bounds)
export(calendar)
export(definition)
export(indexOf)
export(is_complete)
export(month_days)
export(offsets)
export(origin)
export(parse_timestamps)
export(resolution)
export(slab)
export(timezone)
export(unit)
exportClasses(CFdatum)
exportClasses(CFtime)
exportMethods("+")
exportMethods("==")
exportMethods("bounds<-")
exportMethods(as.character)
exportMethods(bounds)
exportMethods(cut)
exportMethods(format)
exportMethods(indexOf)
exportMethods(length)
exportMethods(range)
importFrom(lubridate,days)
importFrom(lubridate,make_date)
importFrom(lubridate,mday)
importFrom(lubridate,month)
importFrom(lubridate,year)
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

* Do not drop degenerate dimension on bounds when only 1 offset is included in
subsetting.
* `standard` calendar now uses mixed Gregorian/Julian calendar as defined in the
CF Metadata Conventions. `proleptic_gregorian` is now a separate calendar with
its own code base.
* Negative offsets from a calendar origin are allowed.
* Code is refactored to R6. R6 class CFTime replaces S4 class CFtime (note the
difference in case). S4 class CFdatum has been replaced by hierarchy of
R6 CFCalendar classes, with various non-exported functions converted into
methods of CFCalendar. The code is now much cleaner and easier to extend.

# CFtime 1.4.1

Expand Down
Loading

0 comments on commit ac5daa4

Please sign in to comment.