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.1k
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
4k
20210219 Flutterに入門してみた
itok
1
3.8k
20201009 iOS 14 ウィジェットをつくってみた
itok
1
2.3k
20191206 Property Wrappers 入門
itok
0
1.5k
20190920 iOS 13 対応ではまった話
itok
1
2.2k
20190726 Background App Refresh Taskがやってきた
itok
0
2k
20190722 Firebase Remote Configでアドネットワークを管理する
itok
0
1.4k
20190419 iOSアプリで証明書の情報を参照する
itok
0
1.3k
20190412 Android TV向けアプリを作ってみる
itok
0
990
Other Decks in Programming
See All in Programming
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
390
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
php-conference-japan-2024
tasuku43
0
360
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
350
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
140
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
730
nekko cloudにおけるProxmox VE利用事例
irumaru
3
460
testcontainers のススメ
sgash708
1
130
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
280
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
180
AWSのLambdaで PHPを動かす選択肢
rinchoku
2
300
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
960
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Scaling GitHub
holman
459
140k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
How to train your dragon (web standard)
notwaldorf
88
5.7k
The World Runs on Bad Software
bkeepers
PRO
66
11k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
GitHub's CSS Performance
jonrohan
1031
460k
A Tale of Four Properties
chriscoyier
157
23k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Unsuck your backbone
ammeep
669
57k
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 ৽͍͠ΫϥεͱϝιουΛศརʹ͍ͬͯ͜͏ʂ