![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Macros | |
| #define | _CRT_SECURE_NO_DEPRECATE |
| #define | UCHAR(x) (((x) >= 'a' && (x) <= 'z') ? ((x)&~32) : (x)) |
Functions | |
| void | divMod (int n, int d, int *result, int *remainder) |
| int | isLeapYear (int year) |
| int | datetime_findMonth (char *month) |
| Finds the month of the year for a date. | |
| DateTime | datetime_encodeDate (int year, int month, int day) |
| Encodes a date values from year, month, and day to a DateTime value. | |
| DateTime | datetime_encodeTime (int hour, int minute, int second) |
| Encodes a time value from hour, minute, and second to a DateTime value. | |
| void | datetime_decodeDate (DateTime date, int *year, int *month, int *day) |
| Decodes a DateTime value to year, month, and day. | |
| void | datetime_decodeTime (DateTime time, int *h, int *m, int *s) |
| Decodes a DateTime value to hour, minute, and second. | |
| void | datetime_dateToStr (DateTime date, char *s) |
| Converts a DateTime value to a string. | |
| void | datetime_timeToStr (DateTime time, char *s) |
| Converts a DateTime value to a string. | |
| int | datetime_strToDate (char *s, DateTime *d) |
| Converts a string to a DateTime value. | |
| int | datetime_strToTime (char *s, DateTime *t) |
| Converts a string to a DateTime value. | |
| void | datetime_setDateFormat (int fmt) |
| Sets the date format. | |
| DateTime | datetime_addSeconds (DateTime date1, double seconds) |
| Adds seconds to a DateTime value. | |
| DateTime | datetime_addDays (DateTime date1, DateTime date2) |
| Adds days to a DateTime value. | |
| long | datetime_timeDiff (DateTime date1, DateTime date2) |
| Finds the difference in seconds between two DateTime values. | |
| int | datetime_monthOfYear (DateTime date) |
| Finds the month of the year for a date. | |
| int | datetime_dayOfYear (DateTime date) |
| Finds the day of the year for a date. | |
| int | datetime_dayOfWeek (DateTime date) |
| Finds the day of the week for a date. | |
| int | datetime_hourOfDay (DateTime date) |
| Finds the hour of the day for a time. | |
| int | datetime_daysPerMonth (int year, int month) |
| Finds the number of days in a month. | |
| void | datetime_getTimeStamp (int fmt, DateTime aDate, int stampSize, char *timeStamp) |
| Converts a DateTime value to a string. | |
| #define _CRT_SECURE_NO_DEPRECATE |
| #define UCHAR | ( | x | ) | (((x) >= 'a' && (x) <= 'z') ? ((x)&~32) : (x)) |
Adds days to a DateTime value.
| [in] | date1 | Date value |
| [in] | days | Number of days to add |
Adds seconds to a DateTime value.
| [in] | date1 | Date value |
| [in] | seconds | Number of seconds to add |
| void datetime_dateToStr | ( | DateTime | date, |
| char * | s | ||
| ) |
Converts a DateTime value to a string.
| [in] | date | Date value |
| [out] | s | String to store the date |
| int datetime_dayOfWeek | ( | DateTime | date | ) |
Finds the day of the week for a date.
| [in] | date | Date value |
| int datetime_dayOfYear | ( | DateTime | date | ) |
Finds the day of the year for a date.
| [in] | date | Date value |
| int datetime_daysPerMonth | ( | int | year, |
| int | month | ||
| ) |
Finds the number of days in a month.
| [in] | year | Year |
| [in] | month | Month |
| void datetime_decodeDate | ( | DateTime | date, |
| int * | y, | ||
| int * | m, | ||
| int * | d | ||
| ) |
Decodes a DateTime value to year, month, and day.
| [in] | date | Date value |
| [out] | y | Year |
| [out] | m | Month |
| [out] | d | Day |
| void datetime_decodeTime | ( | DateTime | time, |
| int * | h, | ||
| int * | m, | ||
| int * | s | ||
| ) |
Decodes a DateTime value to hour, minute, and second.
| [in] | time | Time value |
| [out] | h | Hour |
| [out] | m | Minute |
| [out] | s | Second |
| DateTime datetime_encodeDate | ( | int | year, |
| int | month, | ||
| int | day | ||
| ) |
Encodes a date values from year, month, and day to a DateTime value.
| [in] | year | Year |
| [in] | month | Month |
| [in] | day | Day |
| DateTime datetime_encodeTime | ( | int | hour, |
| int | minute, | ||
| int | second | ||
| ) |
Encodes a time value from hour, minute, and second to a DateTime value.
| [in] | hour | Hour |
| [in] | minute | Minute |
| [in] | second | Second |
| int datetime_findMonth | ( | char * | s | ) |
Finds the month of the year for a date.
| [in] | s | String date |
| void datetime_getTimeStamp | ( | int | fmt, |
| DateTime | aDate, | ||
| int | stampSize, | ||
| char * | timeStamp | ||
| ) |
Converts a DateTime value to a string.
| [in] | date | Date value |
| [in] | time | Time value |
| [out] | s | String to store the date and time |
| int datetime_hourOfDay | ( | DateTime | date | ) |
Finds the hour of the day for a time.
| [in] | time | Time value |
| int datetime_monthOfYear | ( | DateTime | date | ) |
Finds the month of the year for a date.
| [in] | date | Date value |
| void datetime_setDateFormat | ( | int | fmt | ) |
Sets the date format.
| [in] | fmt | Date format |
| int datetime_strToDate | ( | char * | s, |
| DateTime * | d | ||
| ) |
Converts a string to a DateTime value.
| [in] | s | String date |
| [out] | d | DateTime value |
| int datetime_strToTime | ( | char * | s, |
| DateTime * | t | ||
| ) |
Converts a string to a DateTime value.
| [in] | s | String time |
| [out] | t | DateTime value |
Finds the difference in seconds between two DateTime values.
| [in] | date1 | First date value |
| [in] | date2 | Second date value |
| void datetime_timeToStr | ( | DateTime | time, |
| char * | s | ||
| ) |
Converts a DateTime value to a string.
| [in] | time | Time value |
| [out] | s | String to store the time |
| void divMod | ( | int | n, |
| int | d, | ||
| int * | result, | ||
| int * | remainder | ||
| ) |
| int isLeapYear | ( | int | year | ) |