From 9c681f38b742b26b841eb42bc19879cb90ac03de Mon Sep 17 00:00:00 2001 From: Benjamin Culkin Date: Mon, 8 Jul 2024 17:30:58 -0400 Subject: Add XML property lists Implement support for the XML property lists that are the newer version of the ASCII ones. There are a few things that still need to be done, but all of the basics are there Next things - Allow collapsing a property list into a series of objects - Serialize both the property list and flattened objects to XML --- .../src/main/java/net/wotonomy/foundation/NSDate.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSDate.java') diff --git a/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSDate.java b/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSDate.java index e3ea753..7a097e4 100644 --- a/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSDate.java +++ b/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSDate.java @@ -18,6 +18,7 @@ License along with this library; if not, see http://www.gnu.org package net.wotonomy.foundation; +import java.time.Instant; import java.util.Date; import java.util.GregorianCalendar; import java.util.TimeZone; @@ -48,6 +49,14 @@ public class NSDate extends Date { super(); } + /** + * Create an NSDate that represents the given instant + * @param inst The instant + */ + public NSDate(Instant inst) { + super(inst.toEpochMilli()); + } + /** * Represents the specified number of seconds from the current date. */ -- cgit v1.2.3