2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -1,2 +1,7 @@
|
|||
{{Clarified-review}}
|
||||
Display the current date in the formats of "2007-11-10" and "Sunday, November 10, 2007".
|
||||
{{Clarified-review}}
|
||||
|
||||
;Task:
|
||||
Display the current date in the formats of:
|
||||
:::* '''2007-11-23''' and
|
||||
:::* '''Sunday, November 23, 2007'''
|
||||
<br><br>
|
||||
|
|
|
|||
6
Task/Date-format/Emacs-Lisp/date-format.l
Normal file
6
Task/Date-format/Emacs-Lisp/date-format.l
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
(format-time-string "%Y-%m-%d")
|
||||
(format-time-string "%F") ;; new in Emacs 24
|
||||
=> "2015-11-08"
|
||||
|
||||
(format-time-string "%A, %B %e, %Y")
|
||||
=> "Sunday, November 8, 2015"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
use DateTime::Utils;
|
||||
use DateTime::Format;
|
||||
|
||||
my $dt = DateTime.now;
|
||||
|
||||
6
Task/Date-format/Perl-6/date-format-2.pl6
Normal file
6
Task/Date-format/Perl-6/date-format-2.pl6
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
use DateTime::Format;
|
||||
|
||||
my $dt = DateTime.now;
|
||||
|
||||
say $dt.yyyy-mm-dd;
|
||||
say strftime('%A, %B %d, %Y', $dt);
|
||||
|
|
@ -1,2 +1,5 @@
|
|||
"{0:yyyy-MM-dd}" -f (Get-Date)
|
||||
"{0:dddd, MMMM d, yyyy}" -f (Get-Date)
|
||||
# or
|
||||
(Get-Date).ToString("yyyy-MM-dd")
|
||||
(Get-Date).ToString("dddd, MMMM d, yyyy")
|
||||
|
|
|
|||
7
Task/Date-format/Rust/date-format.rust
Normal file
7
Task/Date-format/Rust/date-format.rust
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
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());
|
||||
}
|
||||
1
Task/Date-format/UNIX-Shell/date-format-2.sh
Normal file
1
Task/Date-format/UNIX-Shell/date-format-2.sh
Normal file
|
|
@ -0,0 +1 @@
|
|||
date +"%F"
|
||||
Loading…
Add table
Add a link
Reference in a new issue