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
3.8k
20210219 Flutterに入門してみた
itok
1
3.6k
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
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
290
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
330
Jakarta EE meets AI
ivargrimstad
0
540
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
as(型アサーション)を書く前にできること
marokanatani
10
2.6k
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
初めてDefinitelyTypedにPRを出した話
syumai
0
410
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
Teambox: Starting and Learning
jrom
133
8.8k
What's in a price? How to price your products and services
michaelherold
243
12k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
The Invisible Side of Design
smashingmag
298
50k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Building an army of robots
kneath
302
43k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Agile that works and the tools we love
rasmusluckow
327
21k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
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 ৽͍͠ΫϥεͱϝιουΛศརʹ͍ͬͯ͜͏ʂ