[7] | 1 |
|
---|
| 2 | /*
|
---|
| 3 | *@@sourcefile datetime.h:
|
---|
| 4 | * header file for datetime.c. See remarks there.
|
---|
| 5 | *
|
---|
| 6 | * Note: Version numbering in this file relates to XWorkplace version
|
---|
| 7 | * numbering.
|
---|
| 8 | *
|
---|
| 9 | *@@include #include <os2.h>
|
---|
[113] | 10 | *@@include #include "helpers\datetime.h"
|
---|
[7] | 11 | */
|
---|
| 12 |
|
---|
| 13 | /* Copyright (C) 1997-2000 Ulrich Mller.
|
---|
[14] | 14 | * This file is part of the "XWorkplace helpers" source package.
|
---|
| 15 | * This is free software; you can redistribute it and/or modify
|
---|
[7] | 16 | * it under the terms of the GNU General Public License as published
|
---|
| 17 | * by the Free Software Foundation, in version 2 as it comes in the
|
---|
| 18 | * "COPYING" file of the XWorkplace main distribution.
|
---|
| 19 | * This program is distributed in the hope that it will be useful,
|
---|
| 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 22 | * GNU General Public License for more details.
|
---|
| 23 | */
|
---|
| 24 |
|
---|
| 25 | #ifndef DATETIME_HEADER_INCLUDED
|
---|
| 26 | #define DATETIME_HEADER_INCLUDED
|
---|
| 27 |
|
---|
| 28 | #if __cplusplus
|
---|
| 29 | extern "C" {
|
---|
| 30 | #endif
|
---|
| 31 |
|
---|
| 32 | ULONG dtGetULongTime(VOID);
|
---|
| 33 |
|
---|
| 34 | int dtCreateFileTimeStamp(PSZ pszTimeStamp,
|
---|
| 35 | FDATE* pfdate,
|
---|
| 36 | FTIME* pftime);
|
---|
| 37 |
|
---|
| 38 | int dtCreateDosTimeStamp(PSZ pszTimeStamp,
|
---|
| 39 | DATETIME* pdt);
|
---|
| 40 |
|
---|
[14] | 41 | ULONG dtDayOfWeek(ULONG day,
|
---|
| 42 | ULONG mon,
|
---|
| 43 | ULONG yr);
|
---|
| 44 |
|
---|
[7] | 45 | int dtIsLeapYear(unsigned yr);
|
---|
| 46 |
|
---|
| 47 | unsigned dtMonths2Days(unsigned month);
|
---|
| 48 |
|
---|
| 49 | long dtYears2Days(unsigned yr);
|
---|
| 50 |
|
---|
| 51 | long dtDate2Scalar(unsigned yr,
|
---|
| 52 | unsigned mo,
|
---|
| 53 | unsigned day);
|
---|
| 54 |
|
---|
| 55 | void dtScalar2Date(long scalar,
|
---|
| 56 | unsigned *pyr,
|
---|
| 57 | unsigned *pmo,
|
---|
| 58 | unsigned *pday);
|
---|
| 59 |
|
---|
[14] | 60 | BOOL dtIsValidDate(LONG day,
|
---|
| 61 | LONG month,
|
---|
| 62 | ULONG year);
|
---|
[7] | 63 | #if __cplusplus
|
---|
| 64 | }
|
---|
| 65 | #endif
|
---|
| 66 |
|
---|
| 67 | #endif
|
---|
| 68 |
|
---|
| 69 |
|
---|