Skip to content

Nanoperiod accessors

Source code

Description

These functions allow access to the components of a nanoperiod

Usage

## S4 method for signature 'nanoperiod'
nanoperiod.month(x)

# S4 method for signature 'nanoperiod'
nanoperiod.day(x)

# S4 method for signature 'nanoperiod'
nanoperiod.nanoduration(x)

Arguments

x A nanoperiod

Value

nanoperiod.month and nanoperiod.day return an integer64 whereas nanoperiod.nanoduration returns a nanoduration

Author(s)

Dirk Eddelbuettel

Leonardo Silvestri

See Also

nanoduration

Examples

library("nanotime")

p <- as.nanoperiod("2y1m1d/12:00:00")
nanoperiod.month(p)
[1] 25
nanoperiod.day(p)
[1] 1
nanoperiod.nanoduration(p)
[1] 12:00:00