HecTime Class
HecTime objects are used to manipulate dates and times and to convert dates and times
among different formats. To use HecTime objects, the HecTime class must be imported
from the hec.heclib.util module (e.g. “from hec.heclib.util import *” or “from
hec.heclib.util import HecTime”). After importing the class, a new HecTime object
can be created by calling HecTime() (e.g. “myTime = HecTime()”). HecTime
methods are described below.
HecTime Methods
1 The format of the string returned by the date(integer format) method and the date portion of the string returned by the dateAndTime(integer format) method are displayed below.
HecTime Date Formats
|
0 |
June 2, 1985 |
10 |
June 2, 85 |
100 |
June 2, 1985 |
110 |
June 2, 85 |
|
1 |
Jun 2, 1985 |
11 |
Jun 2, 85 |
101 |
Jun 2, 1985 |
111 |
Jun 2, 85 |
|
2 |
2 June 1985 |
12 |
2 June 85 |
102 |
2 June 1985 |
112 |
2 June 85 |
|
3 |
June 1985 |
13 |
June 85 |
103 |
June 1985 |
113 |
June 85 |
|
4 |
02Jun1985 |
14 |
02Jun85 |
104 |
02Jun1985 |
114 |
02Jun85 |
|
5 |
2Jun1985 |
15 |
2Jun85 |
105 |
2Jun1985 |
115 |
2Jun85 |
|
6 |
Jun1985 |
16 |
Jun85 |
106 |
Jun1985 |
116 |
Jun85 |
|
7 |
02 Jun 1985 |
17 |
02 Jun 85 |
107 |
02 Jun 1985 |
117 |
02 Jun 85 |
|
8 |
2 Jun 1985 |
18 |
2 Jun 85 |
108 |
2 Jun 1985 |
118 |
2 Jun 85 |
|
9 |
Jun 1985 |
19 |
Jun 85 |
109 |
Jun 1985 |
119 |
Jun 85 |