PyHelios 0.1.11
Loading...
Searching...
No Matches
pyhelios.wrappers.DataTypes.Date Class Reference

Helios Date structure for representing date values. More...

Detailed Description

Helios Date structure for representing date values.

Definition at line 744 of file DataTypes.py.

+ Inheritance diagram for pyhelios.wrappers.DataTypes.Date:
+ Collaboration diagram for pyhelios.wrappers.DataTypes.Date:

Public Member Functions

str __repr__ (self)
 
str __str__ (self)
 
 __new__ (cls, year=None, month=None, day=None)
 Create only pass cls to prevent TypeError on Windows.
 
 __init__ (self, int year=2023, int month=1, int day=1)
 Initialize Date fields with validation.
 
 from_list (self, List[int] input_list)
 Initialize from a list [year, month, day].
 
List[int] to_list (self)
 Convert to list [year, month, day].
 
int JulianDay (self)
 Calculate Julian day number for this date.
 
'DateincrementDay (self)
 Return a new Date object incremented by one day.
 
bool isLeapYear (self)
 Check if this date's year is a leap year.
 
bool __eq__ (self, other)
 Check equality with another Date object.
 
bool __ne__ (self, other)
 Check inequality with another Date object.
 

Public Attributes

 year = year
 
 month = month
 
 day = day
 

Static Protected Attributes

list _fields_
 

Constructor & Destructor Documentation

◆ __init__()

pyhelios.wrappers.DataTypes.Date.__init__ ( self,
int year = 2023,
int month = 1,
int day = 1 )

Initialize Date fields with validation.

Do not call super().__init__() for Windows compatibility.

Parameters
yearYear (1900-3000)
monthMonth (1-12)
dayDay (1-31)

Definition at line 769 of file DataTypes.py.

Member Function Documentation

◆ __eq__()

bool pyhelios.wrappers.DataTypes.Date.__eq__ ( self,
other )

Check equality with another Date object.

Definition at line 832 of file DataTypes.py.

◆ __ne__()

bool pyhelios.wrappers.DataTypes.Date.__ne__ ( self,
other )

Check inequality with another Date object.

Definition at line 840 of file DataTypes.py.

◆ __new__()

pyhelios.wrappers.DataTypes.Date.__new__ ( cls,
year = None,
month = None,
day = None )

Create only pass cls to prevent TypeError on Windows.

Definition at line 757 of file DataTypes.py.

◆ __repr__()

str pyhelios.wrappers.DataTypes.Date.__repr__ ( self)

Definition at line 750 of file DataTypes.py.

◆ __str__()

str pyhelios.wrappers.DataTypes.Date.__str__ ( self)

Definition at line 753 of file DataTypes.py.

◆ from_list()

pyhelios.wrappers.DataTypes.Date.from_list ( self,
List[int] input_list )

Initialize from a list [year, month, day].

Definition at line 791 of file DataTypes.py.

◆ incrementDay()

'Date' pyhelios.wrappers.DataTypes.Date.incrementDay ( self)

Return a new Date object incremented by one day.

Definition at line 810 of file DataTypes.py.

◆ isLeapYear()

bool pyhelios.wrappers.DataTypes.Date.isLeapYear ( self)

Check if this date's year is a leap year.

Definition at line 828 of file DataTypes.py.

◆ JulianDay()

int pyhelios.wrappers.DataTypes.Date.JulianDay ( self)

Calculate Julian day number for this date.

Definition at line 803 of file DataTypes.py.

◆ to_list()

List[int] pyhelios.wrappers.DataTypes.Date.to_list ( self)

Convert to list [year, month, day].

Definition at line 799 of file DataTypes.py.

Member Data Documentation

◆ _fields_

list pyhelios.wrappers.DataTypes.Date._fields_
staticprotected

Definition at line 748 of file DataTypes.py.

◆ day

pyhelios.wrappers.DataTypes.Date.day = day

Definition at line 788 of file DataTypes.py.

◆ month

pyhelios.wrappers.DataTypes.Date.month = month

Definition at line 787 of file DataTypes.py.

◆ year

pyhelios.wrappers.DataTypes.Date.year = year

Definition at line 786 of file DataTypes.py.


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