TSDuck v3.40-3968
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::Time::Fields Struct Reference

Broken-down fields of a time value. More...

#include <tsTime.h>

Public Member Functions

 Fields (int year_=0, int month_=0, int day_=0, int hour_=0, int minute_=0, int second_=0, int millisecond_=0)
 Constructor.
 
bool isValid () const
 Validation of the fields.
 
bool operator== (const Fields &other) const
 Equality operator.
 

Public Attributes

int day
 Number of days (1 to 31).
 
int hour
 Number of hours (0 to 23).
 
int millisecond
 Number of milliseconds (0 to 999).
 
int minute
 Number of minutes (0 to 59).
 
int month
 Number of months (1 to 12).
 
int second
 Number of seconds (0 to 59).
 
int year
 Number of years.
 

Detailed Description

Broken-down fields of a time value.

This inner class is a simple aggregation of date fields with public members.

Constructor & Destructor Documentation

◆ Fields()

ts::Time::Fields::Fields ( int  year_ = 0,
int  month_ = 0,
int  day_ = 0,
int  hour_ = 0,
int  minute_ = 0,
int  second_ = 0,
int  millisecond_ = 0 
)

Constructor.

There is no verification of the field values.

Parameters
[in]year_Number of years.
[in]month_Number of months (1 to 12).
[in]day_Number of days (1 to 31).
[in]hour_Number of hours (0 to 23).
[in]minute_Number of minutes (0 to 59).
[in]second_Number of seconds (0 to 59).
[in]millisecond_Number of milliseconds (0 to 999).

Member Function Documentation

◆ operator==()

bool ts::Time::Fields::operator== ( const Fields other) const

Equality operator.

Parameters
[in]otherAnother Fields to compare with this object.
Returns
True is this object is equal to the other object, false otherwise.

◆ isValid()

bool ts::Time::Fields::isValid ( ) const

Validation of the fields.

Returns
True if the fields are valid, false otherwise.

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