Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
3.9k
20210219 Flutterに入門してみた
itok
1
3.7k
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
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
1
150
Vapor Revolution
kazupon
2
2.4k
第5回日本眼科AI学会総会_AIコンテスト_3位解法
neilsaw
0
100
Functional Event Sourcing using Sekiban
tomohisa
0
130
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
6
2.3k
Swift Testing - iPlayground
chiaoteni
0
140
大規模サイトリビルドの現場から:成功と失敗のリアルな教訓 / Site Rebuild,Real Lessons Learned from Successes and Failures_JJUG Fall 2024
techtekt
0
200
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
3.1k
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
220
Arm移行タイムアタック
qnighy
0
390
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
150
As an Engineers, let's build the CRM system via LINE Official Account 2.0
clonn
1
610
Featured
See All Featured
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Designing the Hi-DPI Web
ddemaree
280
34k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
What's in a price? How to price your products and services
michaelherold
243
12k
Making Projects Easy
brettharned
115
5.9k
Automating Front-end Workflow
addyosmani
1366
200k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Writing Fast Ruby
sferik
627
61k
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 ৽͍͠ΫϥεͱϝιουΛศརʹ͍ͬͯ͜͏ʂ