6#include <memory_resource>
8#include <nk/value/value.hpp>
9#include <nk/value/span.hpp>
11namespace nk::builtin {
137Value addtodate(
const Value &d,
double quantity,
const std::string &unit, std::pmr::memory_resource *mr =
nullptr);
Core MATLAB-compatible multidimensional array and scalar value type.
Value weekday(const Value &d, std::pmr::memory_resource *mr=nullptr)
Day of week for date number or text (weekday(d)).
Value calendar(Span< const Value > args, std::pmr::memory_resource *mr=nullptr)
Generates 6x7 calendar matrix for year and month (calendar(...)).
Value datestr(Span< const Value > args, std::pmr::memory_resource *mr=nullptr)
Formats serial date number or date vector into text string (datestr(...)).
Value datevec(Span< const Value > args, std::pmr::memory_resource *mr=nullptr)
Converts serial date number or text into date vector matrix [Y, M, D, H, MI, S] (datevec(....
double cputime()
Total CPU time consumed by the current process in seconds (cputime).
Value clock(std::pmr::memory_resource *mr=nullptr)
Current date and time as a 6-element vector [Y, M, D, H, MI, S] (clock).
void pause(double seconds)
Halts execution for specified number of seconds (pause(n)).
double now()
Current date and time as a serial date number (now).
Value datenum(Span< const Value > args, std::pmr::memory_resource *mr=nullptr)
Converts date components or string to serial date number (datenum(...)).
Value juliandate(Span< const Value > args, std::pmr::memory_resource *mr=nullptr)
Julian date number from serial date or date components (juliandate(...)).
Value mjuliandate(Span< const Value > args, std::pmr::memory_resource *mr=nullptr)
Modified Julian date number (mjuliandate(...)).
Value etime(const Value &t2, const Value &t1, std::pmr::memory_resource *mr=nullptr)
Elapsed time in seconds between two date vectors (etime(t2, t1)).
Value weeknum(Span< const Value > args, std::pmr::memory_resource *mr=nullptr)
Week number of the year for a given date (weeknum(...)).
Value yyyymmdd(Span< const Value > args, std::pmr::memory_resource *mr=nullptr)
Formats date number as ISO integer YYYYMMDD (yyyymmdd(...)).
std::string date()
Current date as formatted text 'dd-mmm-yyyy' (date).
Value addtodate(const Value &d, double quantity, const std::string &unit, std::pmr::memory_resource *mr=nullptr)
Shifts date by quantity in specified time units (addtodate(d, q, unit)).
Value eomday(const Value &y, const Value &m, std::pmr::memory_resource *mr=nullptr)
End of month day for year and month (eomday(y, m)).