Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
20161226 日付のあれこれ
Search
Kei Ito
December 26, 2016
Programming
0
1.2k
20161226 日付のあれこれ
関モバ #21の資料です
Kei Ito
December 26, 2016
Tweet
Share
More Decks by Kei Ito
See All by Kei Ito
20211015 Mac CatalystでmacOS用アプリを作る
itok
2
4.4k
20210219 Flutterに入門してみた
itok
1
4k
20201009 iOS 14 ウィジェットをつくってみた
itok
1
2.4k
20191206 Property Wrappers 入門
itok
0
1.6k
20190920 iOS 13 対応ではまった話
itok
1
2.4k
20190726 Background App Refresh Taskがやってきた
itok
0
2.2k
20190722 Firebase Remote Configでアドネットワークを管理する
itok
0
1.6k
20190419 iOSアプリで証明書の情報を参照する
itok
0
1.5k
20190412 Android TV向けアプリを作ってみる
itok
0
1.1k
Other Decks in Programming
See All in Programming
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
140
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
170
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
810
文字コードの話
qnighy
44
17k
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.2k
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
7.9k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
410
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
130
株式会社 Sun terras カンパニーデック
sunterras
0
2.1k
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
390
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
710
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
130
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.1k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
130
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
280
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
190
Into the Great Unknown - MozCon
thekraken
40
2.3k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
140
Believing is Seeing
oripsolob
1
79
Transcript
ͷ͋Ε͜Ε ؔϞόΠϧΞϓϦݚڀձ !JUPL@UXJU
!JUPL@UXJU w ͍ͱ͏͚͍ʢJUPLʣ w ɹɹɹɹɹɹͷதͷਓ w ެࢲڞʹϓϩάϥϚJ04.BDʢͨ·ʹ"OESPJE8JOEPXTʣ w IUUQJUPLKQ IUUQTPSBLB[FDPKQ
,PUMJO͡Ί·ͨ͠
ͷ͋Ε͜Ε J04NBD04UW04ڞ௨
ओͳΫϥεͨͪ w %BUF'PSNBUUFS w *40%BUF'PSNBUUFS w %BUF*OUFSWBM'PSNBUUFS w %BUF$PNQPOFOUT'PSNBUUFS w
$BMFOEBS w %BUF$PNQPOFOUT w %BUF*OUFSWBM
%BUF'PSNBUUFS *40%BUF'PSNBUUFS %BUF'PSNBUUFS %BUF*OUFSWBM'PSNBUUFS %BUF$PNQPOFOUT'PSNBUUFS 'PSNBUUFS
let formatter = DateFormatter() formatter.locale = Locale(identifier: "ja_JP") formatter.setLocalizedDateFormatFromTemplate("yMMMMd") formatter.string(from:
date) // 201612݄26 let formatter = DateFormatter() formatter.locale = Locale(identifier: “fr_FR") formatter.setLocalizedDateFormatFromTemplate("yMMMMd") formatter.string(from: date) // 26 décembre 2016 let formatter = DateFormatter() formatter.locale = Locale(identifier: "ja_JP") formatter.calendar = Calendar(identifier: .japanese) formatter.setLocalizedDateFormatFromTemplate("GyMd") formatter.string(from: date) // ฏ2812݄26 %BUF'PSNBUUFS
let formatter = ISO8601DateFormatter() formatter.string(from: date) // 2016-12-26T04:23:50Z formatter.formatOptions =
[.withFullDate, .withFullTime, .withSpaceBetweenDateAndTime] formatter.string(from: date) // 2016-12-26 04:23:50Z *40%BUF'PSNBUUFS
let formatter = DateIntervalFormatter() formatter.string(from: now, to: future) // 2016/12/26
19࣌00ʙ21࣌00 formatter.dateTemplate = "Hm" formatter.string(from: now, to: future) // 19࣌00ʙ21࣌00 %BUF*OUFSWBM'PSNBUUFS
%BUF$PNQPOFOUT'PSNBUUFS let formatter = DateComponentsFormatter() formatter.string(from: now, to: future) //
1 5:27:50 formatter.allowedUnits = [.hour, .minute] formatter.string(from: now, to: future) // 29:27 comp.includesApproximationPhrase = true comp.string(from: now, to: future) // About 29:27
$BMFOEBS // ࠓʁ calendar.isDateInToday(date) // ಉ͡ʁ calendar.isDate(date, inSameDayAs: future) //
ͦͷͷ಄ calendar.startOfDay(for: date)
let interval = DateInterval(start: date, end: future) intervalFormatter.string(from: interval) //
2016/12/26 19࣌00ʙ21࣌00 ॏͳ͍ͬͯΔ͔ interval.intersects(interval2) // ॏͳΓ෦Λநग़ interval.intersection(with: interval2) %BUF*OUFSWBM
·ͱΊ w ॲཧ݁ߏେม w J04͘Β͍͔Β͍ͣͿΜͱָʹͳͬͨ w ৽͍͠ΫϥεͱϝιουΛศརʹ͍ͬͯ͜͏ʂ