Date manipulation: Difference between revisions

Added Arturo implementation
(Add Rust implementation)
(Added Arturo implementation)
Line 165:
{{output}}
<pre>"March 8 2009 8:30am EDT"</pre>
 
=={{header|Arturo}}==
 
<lang rebol>; a tiny helper, so that we aren't too repetitive
formatDate: function [dt][
to :string .format: "MMMM d yyyy h:mmtt" dt
]
 
initial: "March 7 2009 7:30pm EST"
 
; chop timezone off
initial: join.with:" " chop split.words initial
initial: to :date .format: "MMMM d yyyy h:mmtt" initial
 
print ["initial:" formatDate initial]
print ["after 12 hours:" formatDate after.hours:12 initial]</lang>
 
{{out}}
 
<pre>initial: March 7 2009 7:30PM
after 12 hours: March 8 2009 7:30AM</pre>
 
=={{header|AutoHotkey}}==
1,532

edits