C# Class gov.va.medora.utils.DateUtils

Afficher le fichier Open project: OSEHRA/mdo

Méthodes publiques

Méthode Description
CheckDateRange ( string fromDate, string toDate ) : void
IsoDateStringToDateTime ( string dateString ) : System.DateTime

Changes yyyyMMdd.HHmmss formatted string to date.

pads missing least significant digits (e.g. seconds or milliseconds) with 0s.

is30DayMonth ( int month ) : bool
isLeapYear ( int year ) : bool
isValidDay ( int year, int month, int dy ) : bool
isValidMonth ( int month ) : bool
isWellFormedDatePart ( string dt ) : bool
isWellFormedTimePart ( string dt ) : bool
isWellFormedUtcDateTime ( string dt ) : bool
toVistaTimestampString ( System.DateTime dateTime ) : string
trimSeconds ( string timestamp ) : string
trimTime ( string timestamp ) : string

Removes the time portion (if present) of a date/time string of expected format.

NOTE: this function doesn't check for well-formatted-ness of timestamp argument. If you need to check, use the isWellFormed...() functions

zeroSeconds ( string timestamp ) : string

Private Methods

Méthode Description
subtractSecond ( string timestamp ) : string

Method Details

CheckDateRange() public static méthode

public static CheckDateRange ( string fromDate, string toDate ) : void
fromDate string
toDate string
Résultat void

IsoDateStringToDateTime() public static méthode

Changes yyyyMMdd.HHmmss formatted string to date.
pads missing least significant digits (e.g. seconds or milliseconds) with 0s.
public static IsoDateStringToDateTime ( string dateString ) : System.DateTime
dateString string
Résultat System.DateTime

is30DayMonth() public static méthode

public static is30DayMonth ( int month ) : bool
month int
Résultat bool

isLeapYear() public static méthode

public static isLeapYear ( int year ) : bool
year int
Résultat bool

isValidDay() public static méthode

public static isValidDay ( int year, int month, int dy ) : bool
year int
month int
dy int
Résultat bool

isValidMonth() public static méthode

public static isValidMonth ( int month ) : bool
month int
Résultat bool

isWellFormedDatePart() public static méthode

public static isWellFormedDatePart ( string dt ) : bool
dt string
Résultat bool

isWellFormedTimePart() public static méthode

public static isWellFormedTimePart ( string dt ) : bool
dt string
Résultat bool

isWellFormedUtcDateTime() public static méthode

public static isWellFormedUtcDateTime ( string dt ) : bool
dt string
Résultat bool

toVistaTimestampString() public static méthode

public static toVistaTimestampString ( System.DateTime dateTime ) : string
dateTime System.DateTime
Résultat string

trimSeconds() public static méthode

public static trimSeconds ( string timestamp ) : string
timestamp string
Résultat string

trimTime() public static méthode

Removes the time portion (if present) of a date/time string of expected format.
NOTE: this function doesn't check for well-formatted-ness of timestamp argument. If you need to check, use the isWellFormed...() functions
public static trimTime ( string timestamp ) : string
timestamp string yyyyMMdd.HHmmss or yyyyMMdd
Résultat string

zeroSeconds() public static méthode

public static zeroSeconds ( string timestamp ) : string
timestamp string
Résultat string