1.3.49
 
Loading...
Searching...
No Matches
helios::Date Struct Reference

Date vector. More...

#include <helios_vector_types.h>

Public Member Functions

constexpr Date ()
 Default constructor.
 
 Date (int day, int month, int year)
 Day/Month/Year constructor.
 
int JulianDay () const
 Convert to Julian day.
 
void incrementDay ()
 Increment Date vector by one day.
 
bool isLeapYear () const
 Check whether it is a leap year.
 
constexpr bool operator== (const helios::Date &c) const noexcept
 check for equality of two dates
 
constexpr bool operator!= (const helios::Date &c) const noexcept
 check for inequality of two Dates
 

Data Fields

int day
 Day of month.
 
int month
 Month of year.
 
int year
 Year in YYYY format.
 

Friends

std::ostream & operator<< (std::ostream &os, helios::Date const &d)
 Write Date to output stream.
 

Detailed Description

Date vector.

See also
make_Date()

Definition at line 1659 of file helios_vector_types.h.

Constructor & Destructor Documentation

◆ Date() [1/2]

constexpr helios::Date::Date ( )
inlineconstexpr

Default constructor.

Definition at line 1670 of file helios_vector_types.h.

◆ Date() [2/2]

helios::Date::Date ( int  day,
int  month,
int  year 
)
inline

Day/Month/Year constructor.

Parameters
[in]dayDay of month (1-31)
[in]monthDay of year (1-12)
[in]yearYear in YYYY format

Definition at line 1679 of file helios_vector_types.h.

Member Function Documentation

◆ incrementDay()

void helios::Date::incrementDay ( )

Increment Date vector by one day.

Definition at line 219 of file global.cpp.

◆ isLeapYear()

bool helios::Date::isLeapYear ( ) const

Check whether it is a leap year.

Returns
True if it is a leap year, false if not

Definition at line 245 of file global.cpp.

◆ JulianDay()

int helios::Date::JulianDay ( ) const

Convert to Julian day.

Returns
Julian day of the year

Definition at line 205 of file global.cpp.

◆ operator!=()

constexpr bool helios::Date::operator!= ( const helios::Date c) const
constexprnoexcept

check for inequality of two Dates

Definition at line 1739 of file helios_vector_types.h.

◆ operator==()

constexpr bool helios::Date::operator== ( const helios::Date c) const
constexprnoexcept

check for equality of two dates

Definition at line 1735 of file helios_vector_types.h.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
helios::Date const &  d 
)
friend

Write Date to output stream.

Definition at line 1711 of file helios_vector_types.h.

Field Documentation

◆ day

int helios::Date::day

Day of month.

Definition at line 1663 of file helios_vector_types.h.

◆ month

int helios::Date::month

Month of year.

Definition at line 1665 of file helios_vector_types.h.

◆ year

int helios::Date::year

Year in YYYY format.

Definition at line 1667 of file helios_vector_types.h.


The documentation for this struct was generated from the following files: