litesoft
Diff Revisions
941
vs
942
for /trunk/Java/core/Anywhere/src/org/litesoft/core/simpletypes/temporal/TimeRes.java
|
@@ -1,6 +1,7 @@ |
1 |
1 |
|
// This Source Code is in the Public Domain per: http://litesoft.org/License.txt |
2 |
2 |
|
package org.litesoft.core.simpletypes.temporal; |
3 |
3 |
|
|
|
4 |
+ |
import org.litesoft.commonfoundation.typeutils.gregorian.*; |
4 |
5 |
|
import org.litesoft.core.simpletypes.temporal.nonpublic.*; |
5 |
6 |
|
|
6 |
7 |
|
/** |
|
@@ -43,6 +44,11 @@ |
43 |
44 |
|
return (TimeRes) LLfromIndex( OPTIONS, pIndex ); |
44 |
45 |
|
} |
45 |
46 |
|
|
|
47 |
+ |
public static TimeRes from( TemporalResolution pTemporalResolution ) |
|
48 |
+ |
{ |
|
49 |
+ |
return fromIndex( pTemporalResolution.ordinal() - TemporalResolution.ToHour.ordinal() ); |
|
50 |
+ |
} |
|
51 |
+ |
|
46 |
52 |
|
public static TimeRes rehydrate( String pDesiccated ) |
47 |
53 |
|
throws IllegalArgumentException |
48 |
54 |
|
{ |