September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
8
Task/Date-format/AppleScript/date-format.applescript
Normal file
8
Task/Date-format/AppleScript/date-format.applescript
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
property text item delimiters : {", ", "T"}
|
||||
|
||||
set shortdate to text item 1 of (the (current date) as «class isot» as string)
|
||||
|
||||
set [w, m, d, y] to the [weekday, month, day, year] of (the current date)
|
||||
set longdate to {w, [m, space, d], y} as text
|
||||
|
||||
shortdate & linefeed & longdate
|
||||
14
Task/Date-format/Neko/date-format.neko
Normal file
14
Task/Date-format/Neko/date-format.neko
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
<doc>
|
||||
<h2>Date format</h2>
|
||||
<p>Neko uses Int32 to store system date/time values.
|
||||
And lib C strftime style formatting for converting to string form</p>
|
||||
</doc>
|
||||
*/
|
||||
|
||||
var date_now = $loader.loadprim("std@date_now", 0)
|
||||
var date_format = $loader.loadprim("std@date_format", 2)
|
||||
|
||||
var now = date_now()
|
||||
$print(date_format(now, "%F"), "\n")
|
||||
$print(date_format(now, "%A, %B %d, %Y"), "\n")
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
extern crate chrono;
|
||||
use chrono::*;
|
||||
fn main(){
|
||||
let now : DateTime<UTC> = UTC::now();
|
||||
println!("{}", now.format("%Y-%m-%d").to_string());
|
||||
println!("{}", now.format("%A, %B %d, %Y").to_string());
|
||||
fn main() {
|
||||
let now = chrono::Utc::now();
|
||||
println!("{}", now.format("%Y-%m-%d"));
|
||||
println!("{}", now.format("%A, %B %d, %Y"));
|
||||
}
|
||||
|
|
|
|||
2
Task/Date-format/Smalltalk/date-format-2.st
Normal file
2
Task/Date-format/Smalltalk/date-format-2.st
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Date today printOn:Stdout format:'%y-%m-%d'.
|
||||
Date today printOn:Stdout format:'%(DayName), %(MonthName) %d, %y' language:#en.
|
||||
Loading…
Add table
Add a link
Reference in a new issue