File modification time: Difference between revisions

Add Jsish
(Add Jsish)
Line 737:
<lang javascript>var file = document.getElementById("fileInput").files.item(0);
var last_modified = file.lastModifiedDate;</lang>
 
=={{header|Jsish}}==
Getting the mod time is a builtin. Setting the time is currently not, so ''touch'' is used here.
 
A C extension could provide access to the ''utime'' system call if desired.
 
<lang javascript>/* File modification times, in Jsi */
 
var fileTime = File.mtime('fileModificationTime.jsi');
puts("Last mod time was: ", strftime(fileTime * 1000));
 
exec('touch fileModificationTime.jsi');
 
fileTime = File.mtime('fileModificationTime.jsi');
puts("Mod time now: ", strftime(fileTime * 1000));</lang>
 
{{out}}
<pre>prompt$ jsish fileModificationTime.jsi
Last mod time was: 2019-05-08 13:21:10
Mod time now: 2019-05-08 13:23:35</pre>
 
=={{header|Julia}}==
Anonymous user