1 // Copyright 2006-2007, by the California Institute of Technology. 2 // ALL RIGHTS RESERVED. United States Government Sponsorship acknowledged. 3 // Any commercial use must be negotiated with the Office of Technology Transfer 4 // at the California Institute of Technology. 5 // 6 // This software is subject to U. S. export control laws and regulations 7 // (22 C.F.R. 120-130 and 15 C.F.R. 730-774). To the extent that the software 8 // is subject to U.S. export control laws and regulations, the recipient has 9 // the responsibility to obtain export licenses or other export authority as 10 // may be required before exporting such information to foreign countries or 11 // providing access to foreign nationals. 12 // 13 // $Id: DateTime.java 2606 2007-04-18 19:35:09Z pramirez $ 14 // 15 16 package gov.nasa.pds.tools.label; 17 18 import java.text.ParseException; 19 import java.util.Date; 20 21 /*** 22 * @author pramirez 23 * @version $Revision: 2606 $ 24 * 25 */ 26 public class DateTime extends Scalar { 27 private Date date; 28 29 /*** 30 * @param value 31 */ 32 public DateTime(String value) throws ParseException { 33 super(value); 34 date = DateTimeFormatter.parse(value); 35 } 36 37 public DateTime(Date date) { 38 super(date.toString()); 39 this.date = date; 40 } 41 42 public Date getDate() {return date;} 43 44 }