Slide 1

Slide 1 text

.(6a6&;YGU]6]? S]EY??

Slide 2

Slide 2 text

O? 㗢 S]EY??SQQ]?YQ?] 㗢 E]]U[㗣㘍㘍9MSC㗿S]EY??㗿Q?] 㗢 .?9&]6Q=6Y= SMMSd?Y㗦 YSQ]?Q= QCGQ??Y 㗢 &* 㗦&㗦&㗦 㗿㗿㗿

Slide 3

Slide 3 text

.(6a6&;YGU]6]?

Slide 4

Slide 4 text

.(6a6&;YGU]6]?

Slide 5

Slide 5 text

“Wat” is a variant of the English word “what” that is often used to express confusion or disgust, much like its better known acronym “WTF,” short for “what the fuck.” http://knowyourmeme.com/memes/wat

Slide 6

Slide 6 text

0.1 + 0.2

Slide 7

Slide 7 text

0.1 + 0.2 // 0.30000000000000004

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

https://www.destroyallsoftware.com/talks/wat

Slide 17

Slide 17 text

.(6a6&;YGU]6]?

Slide 18

Slide 18 text

// Firefox latest new Date("2005-07-08");

Slide 19

Slide 19 text

// Firefox latest new Date("2005-07-08"); // Date 2005-07-08T00:00:00.000Z

Slide 20

Slide 20 text

// Firefox latest new Date("2005-07-08"); // Date 2005-07-08T00:00:00.000Z new Date("2005/07/08");

Slide 21

Slide 21 text

// Firefox latest new Date("2005-07-08"); // Date 2005-07-08T00:00:00.000Z new Date("2005/07/08"); // Date 2005-07-07T16:00:00.000Z

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

// Firefox latest new Date("2005-07-08"); // Date 2005-07-08T00:00:00.000Z // July 8th 00:00 UTC new Date("2005/07/08"); // Date 2005-07-07T16:00:00.000Z // July 8th 00:00 local time

Slide 24

Slide 24 text

// Firefox latest new Date("2005-07-08"); // Date 2005-07-08T00:00:00.000Z // July 8th 00:00 UTC new Date("2005/07/08"); // Date 2005-07-07T16:00:00.000Z // July 8th 00:00 local time (Date.parse("2005-07-08") - Date.parse("2005/07/08")) / 36e5 // 8 hours

Slide 25

Slide 25 text

// Firefox latest new Date("2005-07-08"); // Date 2005-07-08T00:00:00.000Z // July 8th 00:00 UTC new Date("2005/07/08"); // Date 2005-07-07T16:00:00.000Z // July 8th 00:00 local time (Date.parse("2005-07-08") - Date.parse("2005/07/08")) / 36e5 // 8 hours // Chrome latest new Date("2005-07-08");

Slide 26

Slide 26 text

// Firefox latest new Date("2005-07-08"); // Date 2005-07-08T00:00:00.000Z // July 8th 00:00 UTC new Date("2005/07/08"); // Date 2005-07-07T16:00:00.000Z // July 8th 00:00 local time (Date.parse("2005-07-08") - Date.parse("2005/07/08")) / 36e5 // 8 hours // Chrome latest new Date("2005-07-08"); // Fri Jul 08 2005 08:00:00 GMT+0800 (CST) // July 8th 00:00 local time

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

// Firefox var theday = new Date(2017, 2, 3, 0, 0, 0, 0);

Slide 29

Slide 29 text

// Firefox var theday = new Date(2017, 2, 3, 0, 0, 0, 0); // Date 2017-03-02T16:00:00.000Z

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

// Firefox var theday = new Date(2017, 2, 3, 0, 0, 0, 0); // Date 2017-03-02T16:00:00.000Z // 2 -> March, 0 based

Slide 32

Slide 32 text

// Firefox var theday = new Date(2017, 2, 3, 0, 0, 0, 0); // Date 2017-03-02T16:00:00.000Z // 2 -> March, 0 based // UTC Time: 03/02 16:00 // UTC+8 Time: 03/03 00:00

Slide 33

Slide 33 text

// Firefox var theday = new Date(2017, 2, 3, 0, 0, 0, 0); // Date 2017-03-02T16:00:00.000Z // 2 -> March, 0 based // UTC Time: 03/02 16:00 // UTC+8 Time: 03/03 00:00 theday.getDate() // 3 theday.getUTCDate() // 2

Slide 34

Slide 34 text

// Firefox var theday = new Date(2017, 2, 3, 0, 0, 0, 0); // Date 2017-03-02T16:00:00.000Z // 2 -> March, 0 based // UTC Time: 03/02 16:00 // UTC+8 Time: 03/03 00:00 theday.getDate() // 3 theday.getUTCDate() // 2 new Date(2017, 2, 3, 8, 0, 0, 0); // Date 2017-03-03T00:00:00.000Z

Slide 35

Slide 35 text

// Firefox var theday = new Date(2017, 2, 3, 0, 0, 0, 0); // Date 2017-03-02T16:00:00.000Z // 2 -> March, 0 based // UTC Time: 03/02 16:00 // UTC+8 Time: 03/03 00:00 theday.getDate() // 3 theday.getUTCDate() // 2 new Date(2017, 2, 3, 8, 0, 0, 0); // Date 2017-03-03T00:00:00.000Z new Date(Date.UTC(2017, 2, 3, 8, 0, 0, 0)); // Date 2017-03-03T08:00:00.000Z

Slide 36

Slide 36 text

var d = new Date(2016, 12, 31); d.setMonth(d.getMonth() + 1); d.toISOString();

Slide 37

Slide 37 text

new Date('0'); new Date(0); new Date(0, 0); new Date(0, 0, 0);

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

[[_?[ 㗢 Y?CSYG6Q;6M?Q=6YSQMh 㗢 _]69M?㗦 SSY =?[GCQ 㗢 㖍96[?=OSQ]E 㗢 *Q?fU?;]?=U6Y[?Y9?E6aGSY 㗢 S(GO?4SQ?6Q=&([_UUSY] 㗢 S=_Y6]GSQ㗦U?YGS=

Slide 40

Slide 40 text

(E?6]?9I?;] 㗢 S;E6QC?[GQ;?6a6&;YGU]㖎㗿㖍 㗢 6[?=SQ6a6㖎9?]66]㖎㖖㖖㖒 㗢 I6a6㗿_]GM㗿6]?

Slide 41

Slide 41 text

https://twitter.com/BrendanEich/status/481939099138654209

Slide 42

Slide 42 text

(E?6]?  㗢 S;E6QC?[GQ;?6a6&;YGU]㖎㗿㖍 㗢 6[?=SQ6a6㖎9?]66]㖎㖖㖖㖒 㗢 I6a6㗿_]GM㗿6]? 㗢 6a6㖎㗿㖍Y?M?6[?=6]6Q㖎㖖㖖㖓 㗢 ?UY?;6]?=6MOS[]?Q]GY?6]?GQ6a6㖎㗿㖎6] ?9㖎㖖㖖㖔

Slide 43

Slide 43 text

https://www.cs.princeton.edu/courses/archive/fall97/cs461/jdkdocs/relnotes/deprecatedlist.html

Slide 44

Slide 44 text

https://www.cs.princeton.edu/courses/archive/fall97/cs461/jdkdocs/relnotes/deprecatedlist.html

Slide 45

Slide 45 text

6]?㛱(GO?

Slide 46

Slide 46 text

6]?㛱(GO? 㗢 ?6Uh?6Y㗦M?6U[?;SQ= 㗢 (GO?jSQ? 㗢 6M?Q=6Y[ 㗢 &( 㗢 6]E 㗢 S;6MGj6]GSQ

Slide 47

Slide 47 text

6]E 㗢 ==㖏OSQ]E]S㖎㘍㖐㖎

Slide 48

Slide 48 text

// momentjs var thedate = moment("20170131", "YYYYMMDD");

Slide 49

Slide 49 text

// momentjs var thedate = moment("20170131", "YYYYMMDD"); thedate.add(2, 'months').format();

Slide 50

Slide 50 text

// momentjs var thedate = moment("20170131", "YYYYMMDD"); thedate.add(2, 'months').format(); // "2017-03-31T00:00:00+08:00"

Slide 51

Slide 51 text

// momentjs var thedate = moment("20170131", "YYYYMMDD"); thedate.add(2, 'months').format(); // "2017-03-31T00:00:00+08:00" thedate.add(1, 'months').add(1, 'months').format();

Slide 52

Slide 52 text

// momentjs var thedate = moment("20170131", "YYYYMMDD"); thedate.add(2, 'months').format(); // "2017-03-31T00:00:00+08:00" thedate.add(1, 'months').add(1, 'months').format(); // "2017-03-28T00:00:00+08:00"

Slide 53

Slide 53 text

// momentjs var thedate = moment("20170131", "YYYYMMDD"); thedate.add(2, 'months').format(); // "2017-03-31T00:00:00+08:00" thedate.add(1, 'months').add(1, 'months').format(); // "2017-03-28T00:00:00+08:00" thedate.add(1, 'months').format(); // "2017-02-28T00:00:00+08:00"

Slide 54

Slide 54 text

(GO?4SQ? 㗢 *(]GO?;E6QC?[㖎ES_YASYd6Y=6Q=96;Kd6Y= ;SYY?[USQ=GQC]S6㖎㙐ES_Y=GAA?Y?Q;?GQO?6Q[SM6Y]GO? ASY?a?Yh㖎㖒=?CY??[ https://www.timeanddate.com/time/time-zones.html

Slide 55

Slide 55 text

(GO?4SQ? 㗢 [G6㘍69_M 㚗㖍㖑㗣㖐㖍

Slide 56

Slide 56 text

(GO?4SQ? 㗢 [G6㘍69_M 㚗㖍㖑㗣㖐㖍 㗢 [G6㘍6]O6Q=_ 㚗㖍㖒㗣㖑㖒

Slide 57

Slide 57 text

6hMGCE]&6aGQC(GO? 㗢 ۃႌͧ⯇ႏᯒ߭ॶ⤼౟î৩჋ 㗢 ᘔ৫ʼnଋᡦႫ 㗢 ἥῲᡦႫ᫨≡ᙩᖵ⇖

Slide 58

Slide 58 text

// moment.js moment.tz("2014-02-09T02:30", "US/Pacific").format() // "2014-02-09T02:30:00-08:00"

Slide 59

Slide 59 text

// moment.js moment.tz("2014-02-09T02:30", "US/Pacific").format() // "2014-02-09T02:30:00-08:00" moment.tz("2014-03-09T02:30", "US/Pacific").format() // "2014-03-09T03:30:00-07:00"

Slide 60

Slide 60 text

// moment.js moment.tz("2014-02-09T02:30", "US/Pacific").format() // "2014-02-09T02:30:00-08:00" moment.tz("2014-03-09T02:30", "US/Pacific").format() // "2014-03-09T03:30:00-07:00" // Daylight Saving Time

Slide 61

Slide 61 text

https://time.is/en/PT

Slide 62

Slide 62 text

(GO?4SQ?6]696[? 㗢 9h6aG=M[SQ 㗢 SdSU?Y6]?[9h 㗢 ?AGQG]GSQSA6]GO?jSQ? 㗢 6O?[SA]GO?jSQ?[ 㗢 6hMGCE][6aGQC]GO?㘵&(㘸Y_M?[ 㗢 ?6U[?;SQ=

Slide 63

Slide 63 text

https://www.iana.org/time-zones

Slide 64

Slide 64 text

S;6MGj6]GSQ 㗢 㖏㖍㖎㖔㘍㖍㖔㘍㖍㖖㙐(6Gd6Q 㗢 㖍㖔㘍㖍㖖㘍㖏㖍㖎㖔㙐*& 㗢 㖍㖖㘍㖍㖔㘍㖏㖍㖎㖔㙐SYS;;S 㗢 㖍㖖㗿㖍㖔㗿㖏㖍㖎㖔㙐?YO6Q 㗢 㖍㖖㙐㖍㖔㙐㖏㖍㖎㖔㙐_];E 㗢 ٠٩㘍٠٧㘍٢٠١٧㙐Y69G;

Slide 65

Slide 65 text

6M?Q=6Y[ 㗢 Y?CSYG6Q6M?Q=6Y 㗢 Ⱑᄞ㘶_Q6Y6M?Q=6Y㘹 㗢 ᒧڳᄞ 㗢 [M6OG;6M?Q=6Y

Slide 66

Slide 66 text

G9Y6Yh]S]E?$?[;_?

Slide 67

Slide 67 text

G9Y6YG?[

Slide 68

Slide 68 text

G9Y6YG?[ 㗢 SO?Q]㗿I[ 㗢 =6]?㙐AQ[ 㗢 I[㙐IS=6

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

SO?Q]㗿I[ 㗢 _MMA_Q;]GSQ=6]?]GO?MG9Y6Yh 㗢 &_UUSY][㗣 㗢 U?YGS=㗦=_Y6]GSQ 㗢 ]GO?jSQ?㘵]j=9㘸 㗢 G㖎㖕Q㘵dSYKGQCSQ$㘸

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

=6]?㙐AQ[ 㗢 *[?A_MA_Q;]GSQ[]SdSYKdG]E6]?S9I?;] 㗢 S=_M6YGj?=[O6MMA_Q;]GSQ[ 㗢 OO_]69M? 㗢 G㖎㖕Q

Slide 73

Slide 73 text

import addMonths from 'date-fns/add_months' var thedate = new Date(2017, 0, 31); addMonths(thedate, 2);

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

I[㙐IS=6 㗢 6a6S=6㙐(GO? GOUM?O?Q]6]GSQSQ6a6&;YGU] 㗢 9I?;]96[?= =?[GCQ

Slide 76

Slide 76 text

S=6㙐(GO? 㗢 9h&]?UE?QSM?9S_YQ?6]㖏㖍㖍㖏 㗢 ć၏Ŕ„ 㗢 CSSCM?㗣㘍㘍ᆱȍ⍝S=6

Slide 77

Slide 77 text

var thedate = LocalDate.parse('2017-01-31').atStartOfDay(); var after2m = thedate.plusMonths(2); after2m.toString(); // "2017-03-31T00:00" var sixtydays = Duration.ofDays(60); thedate.plus(sixtydays).toString(); // "2017-04-01T00:00" ZonedDateTime.now(ZoneId.of('Europe/Paris')).toString(); // "2017-02-04T17:01:15.846+01:00[Europe/Paris]"

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

(Sd6Y=]S Gf 6a6&;YGU]6]?

Slide 80

Slide 80 text

(S Gf6a6&;YGU] 㗢 S]69M?]S;E6QC?SM=[]_AA 㗢 Y?6]?Q?d]EGQC[G[㘵6MOS[]㘸SK

Slide 81

Slide 81 text

(S Gf6a6&;YGU] 㗢 S]69M?]S;E6QC?SM=[]_AA 㗢 Y?6]?Q?d]EGQC[G[㘵6MOS[]㘸SK 㗢 Y?6]?6Q?d6]? 

Slide 82

Slide 82 text

]?OUSY6M

Slide 83

Slide 83 text

]?OUSY6M 㗢 ?dUYSUS[6M 㗢 S=6MGK? =?[GCQ 㗢 6CCG? GQ]㘵G;YS[SA]㘸 㗢 6]]SEQ[SQ㘵G;YS[SA]㗦6_]ESYSASO?Q]㗿I[㘸 㗢 YG6Q(?YM[SQ㘵G;YS[SA]㘸

Slide 84

Slide 84 text

https://github.com/tc39/proposal-temporal

Slide 85

Slide 85 text

]?OUSY6M 㗢 &;YGU]&]6C?㖎 㗢 Q6;]Ga?=?a?MSUO?Q]QSd 㗢 I[㙐IS=6MGK? 㘵ASYQSd㘸 㗢 QG]E_9

Slide 86

Slide 86 text

?6]_Y?[ 㗢 㖎96[?=OSQ]E 㗢 OO_]69M? 㗢 (GO?jSQ?[_UUSY] 㗢 ?]]?Y 

Slide 87

Slide 87 text

SY?SQ;?U][ 㗢 Q[]6Q] 㗢 ?YGS= 㗢 _Y6]GSQ

Slide 88

Slide 88 text

var ldt = new temporal.LocalDateTime(2017, 12, 31, 23, 59); var addHours = new temporal.LocalDateTime( 2017, 12, 31, 23, 00).add(2, 'hours'); var zdt = new temporal.ZonedDateTime('America/New_York', 2017, 12, 31, 23, 59);

Slide 89

Slide 89 text

var ldt = new CivilDateTime(2017, 12, 31, 23, 59); var addHours = new CivilDateTime(2017, 12, 31, 23, 00) .add(2, 'hours'); var zdt = ldt.withZone(‘America/New_York');

Slide 90

Slide 90 text

(6K?_] 㗢 6]?㗦]GO?G[;SOUM?f 㗢 6a6&;YGU]6]?G[9YSK?Q 㗢 SSY 㗦QS]GO?jSQ?㗦M6;KSA;SQ;?U][ 㗢 *[?MG9Y6YG?[ 㗢 ?MUAGfG]㘵]?OUSY6M㘸

Slide 91

Slide 91 text

(E6QK[