Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrerebeau committed Nov 12, 2024
1 parent 9cdf61c commit 6ba5941
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 49 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export(fixed_to_CE)
export(fixed_to_b2k)
export(fixed_to_julian)
export(year_axis)
exportClasses(GregorianCalendar)
exportClasses(JulianCalendar)
exportClasses(RataDie)
exportClasses(TimeIntervals)
exportClasses(TimeScale)
Expand Down
5 changes: 2 additions & 3 deletions R/AllClasses.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ NULL
#' @author N. Frerebeau
#' @family classes
#' @family calendar classes
#' @family gregorian era classes
#' @docType class
#' @aliases GregorianCalendar-class
#' @keywords internal
#' @exportClass GregorianCalendar
.GregorianCalendar <- setClass(
Class = "GregorianCalendar",
prototype = list(
Expand All @@ -67,7 +66,7 @@ NULL
#' @family calendar classes
#' @docType class
#' @aliases JulianCalendar-class
#' @keywords internal
#' @exportClass JulianCalendar
.JulianCalendar <- setClass(
Class = "JulianCalendar",
prototype = list(
Expand Down
19 changes: 11 additions & 8 deletions R/calendar.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ setMethod(
)

#' @export
#' @describeIn gregorian Gregorian BP era.
#' @rdname calendar
BP <- function(...) {
.GregorianCalendar(
label = tr_("BP"),
Expand All @@ -35,7 +35,7 @@ BP <- function(...) {
}

#' @export
#' @describeIn gregorian Gregorian b2k era.
#' @rdname calendar
b2k <- function(...) {
.GregorianCalendar(
label = tr_("b2k"),
Expand All @@ -46,7 +46,7 @@ b2k <- function(...) {
}

#' @export
#' @describeIn gregorian Gregorian BC era.
#' @rdname calendar
BC <- function(...) {
.GregorianCalendar(
label = tr_("BC"),
Expand All @@ -56,7 +56,7 @@ BC <- function(...) {
}

#' @export
#' @describeIn gregorian Gregorian BCE era.
#' @rdname calendar
BCE <- function(...) {
.GregorianCalendar(
label = tr_("BCE"),
Expand All @@ -66,7 +66,7 @@ BCE <- function(...) {
}

#' @export
#' @describeIn gregorian Gregorian AD era.
#' @rdname calendar
AD <- function(...) {
.GregorianCalendar(
label = tr_("AD"),
Expand All @@ -75,7 +75,7 @@ AD <- function(...) {
}

#' @export
#' @describeIn gregorian Gregorian CE era.
#' @rdname calendar
CE <- function(...) {
.GregorianCalendar(
label = tr_("CE"),
Expand All @@ -84,7 +84,7 @@ CE <- function(...) {
}

# @export
# @describeIn gregorian Gregorian AUC era.
# @rdname calendar
# AUC <- function(...) {
# .GregorianCalendar(
# label = tr_("AUC"),
Expand All @@ -104,7 +104,10 @@ J <- function(...) {
}

# Mutators =====================================================================
calendar_year <- function(object) object@year
calendar_year <- function(object) {
if (is.null(object)) return(NULL)
object@year
}

## Getters ---------------------------------------------------------------------
#' @export
Expand Down
2 changes: 0 additions & 2 deletions man/GregorianCalendar-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/JulianCalendar-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions man/calendar.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 1 addition & 35 deletions man/gregorian.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6ba5941

Please sign in to comment.