11# ctor --------------------------------------------------------------------
22
3- # ' A Simple Year-Month Date Format
3+ # ' A Simple S3-Class for Year-Month Dates
44# '
55# ' A simple data type for storing year-month dates in a human readable integer
66# ' format, e.g.: December 2012 is stored as 201212. Supports simple arithmethics
@@ -117,7 +117,7 @@ as.Date.date_ym <- function(x, ...){
117117
118118# format ------------------------------------------------------------------
119119
120- # ' Format a date_ym object
120+ # ' Format a date_ym Object
121121# '
122122# ' @param x a [date_ym] object
123123# ' @param format A scalar character, valid values are: `"iso"`, `"short"`, and
@@ -192,22 +192,7 @@ format_date_ym_shorter <- function(x){
192192
193193# algebra -----------------------------------------------------------------
194194
195- # ' Date_ym arithmethic operations
196- # '
197- # ' Currently only `+` and `-` are supported, all other basic arithmethic
198- # ' operations are disabled for date_ym objects.
199- # '
200- # ' @param x a date_ym object
201- # ' @param y an integer
202- # ' @param ... passed on to methods
203- # '
204- # ' @name date_ym_arithmetic
205- # ' @seealso [base::Arithmetic]
206-
207-
208-
209-
210- # ' @rdname date_ym_arithmetic
195+ # ' @rdname date_xx_arithmetic
211196# ' @export
212197`+.date_ym` <- function (x , y ){
213198 increment(x , as.integer(y ))
@@ -216,7 +201,7 @@ format_date_ym_shorter <- function(x){
216201
217202
218203
219- # ' @rdname date_ym_arithmetic
204+ # ' @rdname date_xx_arithmetic
220205# ' @export
221206`-.date_ym` <- function (x , y ){
222207 increment(x , as.integer(- y ))
@@ -225,7 +210,7 @@ format_date_ym_shorter <- function(x){
225210
226211
227212
228- # ' @rdname date_ym_arithmetic
213+ # ' @rdname date_xx_arithmetic
229214# ' @export
230215`*.date_ym` <- function (x , y ){
231216 stop(" Operation not supported" )
@@ -234,7 +219,7 @@ format_date_ym_shorter <- function(x){
234219
235220
236221
237- # ' @rdname date_ym_arithmetic
222+ # ' @rdname date_xx_arithmetic
238223# ' @export
239224`/.date_ym` <- function (x , y ){
240225 stop(" Operation not supported" )
@@ -243,7 +228,7 @@ format_date_ym_shorter <- function(x){
243228
244229
245230
246- # ' @rdname date_ym_arithmetic
231+ # ' @rdname date_xx_arithmetic
247232# ' @export
248233`^.date_ym` <- function (x , y ){
249234 stop(" Operation not supported" )
@@ -252,7 +237,7 @@ format_date_ym_shorter <- function(x){
252237
253238
254239
255- # ' @rdname date_ym_arithmetic
240+ # ' @rdname date_xx_arithmetic
256241# ' @export
257242`%%.date_ym` <- function (x , y ){
258243 stop(" Operation not supported" )
@@ -261,7 +246,7 @@ format_date_ym_shorter <- function(x){
261246
262247
263248
264- # ' @rdname date_ym_arithmetic
249+ # ' @rdname date_xx_arithmetic
265250# ' @export
266251`%/%.date_ym` <- function (x , y ){
267252 stop(" Operation not supported" )
@@ -270,7 +255,7 @@ format_date_ym_shorter <- function(x){
270255
271256
272257
273- # ' @rdname date_ym_arithmetic
258+ # ' @rdname date_xx_arithmetic
274259# ' @export
275260seq.date_ym <- function (x , y , ... ){
276261 res <- seq.int(as.integer(x ), as.integer(y ))
@@ -282,7 +267,7 @@ seq.date_ym <- function(x, y, ...){
282267
283268# shortcuts ---------------------------------------------------------------
284269
285- # ' Conveniently produce formatted Year-Month strings
270+ # ' Direclty Create Formatted Year-Month Strings
286271# '
287272# ' @param x,m Two integer (vectors). `m` is optional and the interpretation of
288273# ' `x` will depend on whether `m` is supplied or not:
0 commit comments