Data i czas. More...
#include <time.h>Go to the source code of this file.
Classes | |
| struct | common::DATESPAN |
| Reprezentuje odcinek czasu. More... | |
| struct | common::TIMESPAN |
| Reprezentuje odcinek czasu. More... | |
| struct | common::TMSTRUCT |
| Reprezentuje moment czasu. More... | |
| struct | common::DATETIME |
| Reprezentuje moment czasu. More... | |
| struct | common::GameTime |
| Reprezentuje bądź to bezwzględny czas systemowy, bądź też odcinek (róznicę) czasu, jeśli odjęte dwa GameTime. More... | |
| struct | SthToStr_obj< common::TMSTRUCT > |
| struct | StrToSth_obj< common::TMSTRUCT > |
| struct | SthToStr_obj< common::DATETIME > |
| struct | SthToStr_obj< common::TIMESPAN > |
Namespaces | |
| namespace | common |
Główna przestrzeń nazw biblioteki CommonLib. | |
Enumerations | |
| enum | common::WEEKDAY { common::SUN, common::MON, common::TUE, common::WED, common::THU, common::FRI, common::SAT, common::INV_WEEKDAY } |
Dzień tygodnia. More... | |
| enum | common::MONTH { common::JAN, common::FEB, common::MAR, common::APR, common::MAY, common::JUN, common::JUL, common::AUG, common::SEP, common::OCT, common::NOV, common::DEC, common::INV_MONTH } |
Miesiąc roku. More... | |
| enum | common::NAME_FORM { common::NAME_SHORT = 0x00, common::NAME_LONG = 0x01, common::NAME_LOWERCASE = 0x00, common::NAME_FIRST_UPPERCASE = 0x10, common::NAME_UPPERCASE = 0x20, common::NAME_SHORT_LOWERCASE = 0x00, common::NAME_SHORT_FIRST_UPPERCASE = 0x10, common::NAME_SHORT_UPPERCASE = 0x20, common::NAME_LONG_LOWERCASE = 0x01, common::NAME_LONG_FIRST_UPPERCASE = 0x11, common::NAME_LONG_UPPERCASE = 0x21 } |
Flagi bitowe - należy połączyć razem flagę SHORT/LONG z flagą LOWERCASE/FIRST_UPPERCASE/UPPERCASE lub użyć jednej z już połączonych. More... | |
Functions | |
| DATESPAN | common::operator+ (const DATESPAN &ds1, const DATESPAN &ds2) |
| DATESPAN | common::operator- (const DATESPAN &ds1, const DATESPAN &ds2) |
| DATESPAN | common::operator* (const DATESPAN &ds, int n) |
| DATESPAN | common::operator* (int n, const DATESPAN &ds) |
| TIMESPAN | common::operator* (const TIMESPAN &t, int n) |
| TIMESPAN | common::operator* (int n, const TIMESPAN &t) |
| TIMESPAN | common::operator+ (const TIMESPAN &t1, const TIMESPAN &t2) |
| TIMESPAN | common::operator- (const TIMESPAN &t1, const TIMESPAN &t2) |
| TMSTRUCT | common::operator+ (const TMSTRUCT &tm, const DATESPAN &ds) |
| TMSTRUCT | common::operator- (const TMSTRUCT &tm, const DATESPAN &ds) |
| TIMESPAN | common::operator- (const DATETIME &dt1, const DATETIME &dt2) |
| DATETIME | common::operator+ (const DATETIME &dt, const TIMESPAN &ts) |
| DATETIME | common::operator- (const DATETIME &dt, const TIMESPAN &ts) |
| bool | common::IsLeapYear (int Year) |
| Zwraca true, jeśli podany rok jest przestępny. | |
| uint | common::GetNumOfDaysInYear (int Year) |
| Zwraca liczbę dni w podanym roku (365 lub 366). | |
| uint | common::GetNumOfDaysInMonth (int Year, uint Month) |
| Zwraca liczbę dni w podanym miesiącu podanego roku. | |
| int | common::GetCentury (int Year) |
| Zwraca wiek podanego roku. | |
| time_t | common::GetTimeNow () |
| Zwraca bieżącą datę i czas jako time_t. | |
| void | common::GetTmNow (struct tm *Out) |
| Zwraca bieżącą datę i czas jako struct tm. | |
| DATETIME | common::Now () |
| Zwraca bieżącą datę i czas, dokładność co do sekund. | |
| DATETIME | common::UNow () |
| Zwraca bieżącą datę i czas, dokładność co do milisekund. | |
| const tchar * | common::GetWeekDayName (WEEKDAY WeekDay, NAME_FORM Form) |
| Zwraca nazwę dnia tygodnia w podanej formie (W jezyku polskim!!!). | |
| const tchar * | common::GetMonthName (MONTH Month, NAME_FORM Form) |
| Zwraca nazwę miesiąca w podanej formie (W jezyku polskim!!!). | |
| void | common::DateToStr (tstring *Out, const TMSTRUCT &tm, const tstring &Format) |
| Konwertuje datę na łańcuch. | |
| WEEKDAY | common::StrToWeekDay (const tstring &s) |
| Konwertuje łańcuch na dzień tygodnia. Łańcuch może być w dowolnej formie. | |
| MONTH | common::StrToMonth (const tstring &s) |
| Konwertuje łańcuch na miesiąc. Łańcuch może być w dowolnej formie. | |
| bool | common::StrToDate (TMSTRUCT *Out, const tstring &s, const tstring &Format) |
| Konwertuje łańcuch na datę. | |
| GameTime | common::operator* (int8 v, const GameTime &t) |
| GameTime | common::GetCurrentGameTime () |
| GameTime | common::MillisecondsToGameTime (int Milliseconds) |
| GameTime | common::MillisecondsToGameTime (int8 Milliseconds) |
| GameTime | common::SecondsToGameTime (float Seconds) |
| GameTime | common::SecondsToGameTime (double Seconds) |
Variables | |
| const tchar *const | common::DEFAULT_FORMAT |
| Domyślny format dla StrToDate() i DateToStr(). | |
Data i czas.
Część biblioteki CommonLib
Kodowanie Windows-1250, koniec wiersza CR+LF, test: Zażółć gęślą jaźń
Licencja: GNU LGPL.
Dokumentacja: Module_DateTime
Elementy modułu: DateTime Module
1.6.1