Hello
I am trying to extract the file creation date and time on a Windows11 laptop.
The predicate getFileProperties returns file creation time as a gmtTimeValue, but routines I have found to create an object from which I can extract date and times seem to require gmtTime.
Any suggestions?
Also, do the gmtTime predicates handle leap seconds that are aperiodically inserted?
Is there a way in the VPE editor to click on a term/identifier and find what Prolog thinks the property type is.
Does readln act as a backtrack point so one can use it as a form of repeat?
Thanks
-
- VIP Member
- Posts: 1466
- Joined: 28 Feb 2000 0:01
Re: Time conversion
Your post addresses several completely different things. In future: please only have one subject per post.
1. The constructor time::newFromGmt constructs a time object from a gmtTimeValue:
2. Leap seconds are ignored (not only in Visual Prolog, but by Windows in general).
3. You can "Go to" the declaration of a name using the menu/Ctrl+F12.
4. PFC does not have a readln predicate. But a inputStream's have a predicate:
Which can be used like this:
1. The constructor time::newFromGmt constructs a time object from a gmtTimeValue:
Code: Select all
class time : time
...
constructors
new : (gmtTime InitValue).
newFromGMT : (gmtTimeValue InitValue).
% @short Creates a new <b>time</b> type object and initializes it with the date/time `InitValue` type value.
% @end
3. You can "Go to" the declaration of a name using the menu/Ctrl+F12.
4. PFC does not have a readln predicate. But a inputStream's have a predicate:
Code: Select all
predicates
repeatToEndOfStream : () nondeterm.
% @short Succeeds nondeterministically until the stream is exhausted
% @end
Code: Select all
foreach Input:repeatToEndOfStream() do
Line = Input:readLine(),
...
end foreach
Regards Thomas Linder Puls
PDC
PDC
-
- Posts: 10
- Joined: 7 May 2024 12:02
Re: Time conversion
Hello Thomas
Thanks for your response yesterday. I now have things working - sort of.
Peter
Thanks for your response yesterday. I now have things working - sort of.
Peter
-
- VIP Member
- Posts: 1466
- Joined: 28 Feb 2000 0:01