-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
A couple of tweaks to handle AppleScript typeLongDateTime:
- unpackAsDate calls unpackAsInteger, which does not handle typeLongDateTime. Add to unpackAsInteger:
case typeLongDateTime:
result = T(exactly: Int64(bigEndian: try decodeFixedWidthValue(descriptor.data)))
or alternatively modify existing case:
case typeSInt64, typeLongDateTime:
result = T(exactly: Int64(bigEndian: try decodeFixedWidthValue(descriptor.data)))
-
now that unpackAsDate has computed the TimeInterval delta, fix a bug in the return statement, changing + to -:
return Date(timeIntervalSinceReferenceDate: delta - epochDelta) -
test with a folder on the desktop:
let finder = Finder()
print(try finder.folders["TEMP"].creationDate.get())
- perhaps a better name for "delta" might be "secondsSince1904"?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels