September Morn Update

This commit is contained in:
Ingy döt Net 2019-09-12 10:33:56 -07:00
parent 4e2d22a71d
commit aac6731f2c
6856 changed files with 141342 additions and 21127 deletions

View 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

View 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")

View file

@ -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"));
}

View file

@ -0,0 +1,2 @@
Date today printOn:Stdout format:'%y-%m-%d'.
Date today printOn:Stdout format:'%(DayName), %(MonthName) %d, %y' language:#en.