|
Last change
on this file was 36483, checked in by stoecker, 9 days ago |
|
set eol-style, fix checkstyle issues, add ignores
|
-
Property svn:eol-style
set to
native
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
|---|
| 3 | *
|
|---|
| 4 | * Copyright 2008 jOpenDocument, by ILM Informatique. All rights reserved.
|
|---|
| 5 | *
|
|---|
| 6 | * The contents of this file are subject to the terms of the GNU
|
|---|
| 7 | * General Public License Version 3 only ("GPL").
|
|---|
| 8 | * You may not use this file except in compliance with the License.
|
|---|
| 9 | * You can obtain a copy of the License at http://www.gnu.org/licenses/gpl-3.0.html
|
|---|
| 10 | * See the License for the specific language governing permissions and limitations under the License.
|
|---|
| 11 | *
|
|---|
| 12 | * When distributing the software, include this License Header Notice in each file.
|
|---|
| 13 | *
|
|---|
| 14 | */
|
|---|
| 15 |
|
|---|
| 16 | package org.jopendocument.dom;
|
|---|
| 17 |
|
|---|
| 18 | import java.text.Format;
|
|---|
| 19 | import java.text.SimpleDateFormat;
|
|---|
| 20 |
|
|---|
| 21 | import org.jopendocument.util.FormatGroup;
|
|---|
| 22 | import org.jopendocument.util.XMLDateFormat;
|
|---|
| 23 |
|
|---|
| 24 | public class OOUtils {
|
|---|
| 25 | // as per 16.1 "Data Types" and 6.7.1 "Variable Value Types and Values"
|
|---|
| 26 | // see http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#isoformats
|
|---|
| 27 |
|
|---|
| 28 | // time means Duration for OpenDocument (see 6.7.1)
|
|---|
| 29 | public static final SimpleDateFormat TIME_FORMAT = new SimpleDateFormat("'PT'HH'H'mm'M'ss'S'");
|
|---|
| 30 | static public final Format DATE_FORMAT;
|
|---|
| 31 | static {
|
|---|
| 32 | // first date and time so we don't loose time information on format() or parse()
|
|---|
| 33 | // MAYBE add HH':'mm':'ss,SSS for OOo 1
|
|---|
| 34 | DATE_FORMAT = new FormatGroup(new XMLDateFormat(), new SimpleDateFormat("yyyy-MM-dd'T'HH':'mm':'ss"), new SimpleDateFormat("yyyy-MM-dd"));
|
|---|
| 35 | }
|
|---|
| 36 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.