ݺߣ

ݺߣShare a Scribd company logo
Java 8 Date Time
By Jim Gough

@JavaJimLondon
Agenda
?
?
?
?
?
?
?

Adopt a JSR

What exists in Java 7

New Things - The Basics

Working with Date and Time

Parsing and Formatting

Interoperability with java.util.Date

Advanced Queries
!2
Accompanying Materials
? Code along with github project:

? https:/
/github.com/jpgough/JavaTimeLab

!

? More information on my blog:

? http:/
/javajimlondon.blogspot.com/2014/01/
live-coding-on-java-8-date-time-api.html

!3
LJC/JCP
?

LJC elected onto the JCP committee


?

JCP (Java Community Process)

? The JCP is the mechanism for developing standard
technical speci?cations for the Java technology

!4
Adopt a JSR
?

This is it! JSR-310 is the pilot 


?

This program is intended to:

C Encourage members of the Java Community to get
involved in a JSR.

C Evangelise that JSR to the wider Java Community
community in order to increase grass roots
participation

C https:/
/java.net/projects/adoptajsr/pages/Home
Java Date
?

Java Date has been in the language since January 23,
1996


?

Many good discussions about whats wrong with dates 


?

Mutability


?

Date is a DateTime, but there are other classes for SQL


?

No Timezones


?

Not easy to use

!6
Calendar
? Still mutable

? Cant format a date directly

? Performing arithmetic operations on

dates not clearly supported. For
example time between two points

!7
Example From Its High Time
@JavaOne 2008

?

How many bugs in this code??
?

Date date = new Date(2007, 12, 13, 16,
40); ?
?

TimeZone zone =
TimeZone.getTimeZone("Asia/HongKong");?
?

Calendar cal = new
GregorianCalendar(date, zone); ?
DateFormat fm = new
SimpleDateFormat("HH:mm Z");?
String str = fm.format(cal);
!8
Example From Its High Time
@JavaOne 2008

?

6 bugs in the code!?
?

Date date = new Date(2007, 12, 13, 16,
40); ?
?

TimeZone zone =
TimeZone.getTimeZone("Asia/Hong_Kong");?
?

Calendar cal = new
GregorianCalendar(date, zone); ?
DateFormat fm = new
SimpleDateFormat("HH:mm Z");?
String str = fm.format(cal);
!9
New Things - The Basics
?

New package java.time


?

New objects for representing Dates and Time

C LocalDate

C LocalTime

C LocalDateTime

C ZonedDateTime

!10
Working with Date and Time
?

Instant - Closest thing to java.util.Date


?

Duration

C Measure of time. Eg 34.5 seconds


?

Period

C A date based amount of time. Eg 5 days


?

Difference important when working with
ZonedDateTime operations.

!11
Java.util.Date
?

java.util.Date is actually closest to Instant


?

Now has to toInstant method on


?

Examples

!12
Parsing and Formatting
?

DateTimeFormatter


?

Nice prede?ned formatters:

C DateTimeFormatter.ISO_DATE


?

Can build a custom pattern

C Some slight modi?cation to patterns


?

.format and .parse conveniently on objects.

!13

More Related Content

Viewers also liked (20)

Introduzione a java doc
Introduzione a java docIntroduzione a java doc
Introduzione a java doc
Marcello Missiroli
?
Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8
AppDynamics
?
Access PA and interlibrary loans
Access PA and interlibrary loansAccess PA and interlibrary loans
Access PA and interlibrary loans
Frances Vita
?
14 generics and iterators
14   generics and iterators14   generics and iterators
14 generics and iterators
Tuan Ngo
?
Gartner iam 2011-analytics-aj-orig-recordednp-final
Gartner iam 2011-analytics-aj-orig-recordednp-finalGartner iam 2011-analytics-aj-orig-recordednp-final
Gartner iam 2011-analytics-aj-orig-recordednp-final
OracleIDM
?
Ley federal del trabaj1Ley federal del trabaj1
Ley federal del trabaj1
AHOMEKIRA
?
Moviemaker 120104065957-phpapp01 - copy
Moviemaker 120104065957-phpapp01 - copyMoviemaker 120104065957-phpapp01 - copy
Moviemaker 120104065957-phpapp01 - copy
Amka Anar
?
Copilarie fericita happy childhood
Copilarie fericita happy childhoodCopilarie fericita happy childhood
Copilarie fericita happy childhood
balada65
?
Subversion to Git Migration
Subversion to Git MigrationSubversion to Git Migration
Subversion to Git Migration
Tim Massey
?
P?maraton 2013(1)
P?maraton 2013(1)P?maraton 2013(1)
P?maraton 2013(1)
franekmaster
?
KVH ץ饰ȥ`?
KVH ץ饰ȥ`?KVH ץ饰ȥ`?
KVH ץ饰ȥ`?
KVH Co. Ltd.
?
Traplate
TraplateTraplate
Traplate
Himanshu Bansal
?
BA Netapp Event - Always there IT Infrastructuur
BA Netapp Event - Always there IT InfrastructuurBA Netapp Event - Always there IT Infrastructuur
BA Netapp Event - Always there IT Infrastructuur
B.A.
?
Health Tips by VisitHazara.Com
Health Tips by VisitHazara.ComHealth Tips by VisitHazara.Com
Health Tips by VisitHazara.Com
Muneer Qureshi
?
Volcanoes
VolcanoesVolcanoes
Volcanoes
tomtiju1
?
է֧ݧ ѧ֧ԧڧ֧ܧԧ ݧէڧߧԧ
է֧ݧ ѧ֧ԧڧ֧ܧԧ ݧէڧߧԧէ֧ݧ ѧ֧ԧڧ֧ܧԧ ݧէڧߧԧ
է֧ݧ ѧ֧ԧڧ֧ܧԧ ݧէڧߧԧ
"ѧާ-ѧ٧ߧ"
?
Mortimore Shonga Farms, Nigeria - An experiment in large-scale commercial f...
Mortimore Shonga Farms, Nigeria - An experiment in large-scale commercial f...Mortimore Shonga Farms, Nigeria - An experiment in large-scale commercial f...
Mortimore Shonga Farms, Nigeria - An experiment in large-scale commercial f...
futureagricultures
?
Of mice and men2
Of mice and men2Of mice and men2
Of mice and men2
NShuttle
?
WELL Explains: Kiss Sugar "Bye-Bye"!
WELL Explains: Kiss Sugar "Bye-Bye"!WELL Explains: Kiss Sugar "Bye-Bye"!
WELL Explains: Kiss Sugar "Bye-Bye"!
Erin Michelle
?
#Beyondgender workshops
#Beyondgender workshops#Beyondgender workshops
#Beyondgender workshops
Son Vivienne
?
Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8
AppDynamics
?
Access PA and interlibrary loans
Access PA and interlibrary loansAccess PA and interlibrary loans
Access PA and interlibrary loans
Frances Vita
?
14 generics and iterators
14   generics and iterators14   generics and iterators
14 generics and iterators
Tuan Ngo
?
Gartner iam 2011-analytics-aj-orig-recordednp-final
Gartner iam 2011-analytics-aj-orig-recordednp-finalGartner iam 2011-analytics-aj-orig-recordednp-final
Gartner iam 2011-analytics-aj-orig-recordednp-final
OracleIDM
?
Ley federal del trabaj1Ley federal del trabaj1
Ley federal del trabaj1
AHOMEKIRA
?
Moviemaker 120104065957-phpapp01 - copy
Moviemaker 120104065957-phpapp01 - copyMoviemaker 120104065957-phpapp01 - copy
Moviemaker 120104065957-phpapp01 - copy
Amka Anar
?
Copilarie fericita happy childhood
Copilarie fericita happy childhoodCopilarie fericita happy childhood
Copilarie fericita happy childhood
balada65
?
Subversion to Git Migration
Subversion to Git MigrationSubversion to Git Migration
Subversion to Git Migration
Tim Massey
?
BA Netapp Event - Always there IT Infrastructuur
BA Netapp Event - Always there IT InfrastructuurBA Netapp Event - Always there IT Infrastructuur
BA Netapp Event - Always there IT Infrastructuur
B.A.
?
Health Tips by VisitHazara.Com
Health Tips by VisitHazara.ComHealth Tips by VisitHazara.Com
Health Tips by VisitHazara.Com
Muneer Qureshi
?
է֧ݧ ѧ֧ԧڧ֧ܧԧ ݧէڧߧԧ
է֧ݧ ѧ֧ԧڧ֧ܧԧ ݧէڧߧԧէ֧ݧ ѧ֧ԧڧ֧ܧԧ ݧէڧߧԧ
է֧ݧ ѧ֧ԧڧ֧ܧԧ ݧէڧߧԧ
"ѧާ-ѧ٧ߧ"
?
Mortimore Shonga Farms, Nigeria - An experiment in large-scale commercial f...
Mortimore Shonga Farms, Nigeria - An experiment in large-scale commercial f...Mortimore Shonga Farms, Nigeria - An experiment in large-scale commercial f...
Mortimore Shonga Farms, Nigeria - An experiment in large-scale commercial f...
futureagricultures
?
Of mice and men2
Of mice and men2Of mice and men2
Of mice and men2
NShuttle
?
WELL Explains: Kiss Sugar "Bye-Bye"!
WELL Explains: Kiss Sugar "Bye-Bye"!WELL Explains: Kiss Sugar "Bye-Bye"!
WELL Explains: Kiss Sugar "Bye-Bye"!
Erin Michelle
?
#Beyondgender workshops
#Beyondgender workshops#Beyondgender workshops
#Beyondgender workshops
Son Vivienne
?

Similar to Introduction to Java 8 java.time (20)

ձһϸԱ2011
ձһϸԱ2011ձһϸԱ2011
ձһϸԱ2011
ȱ
?
Jozi-JUG JDK 9 Unconference
Jozi-JUG JDK 9 UnconferenceJozi-JUG JDK 9 Unconference
Jozi-JUG JDK 9 Unconference
Heather VanCura
?
Join the Java Evolution GIDS Bangalore & Pune
Join the Java Evolution GIDS Bangalore & PuneJoin the Java Evolution GIDS Bangalore & Pune
Join the Java Evolution GIDS Bangalore & Pune
Heather VanCura
?
Join the Java Evolution Baltimore/DC/Philly
Join the Java Evolution Baltimore/DC/PhillyJoin the Java Evolution Baltimore/DC/Philly
Join the Java Evolution Baltimore/DC/Philly
Heather VanCura
?
Javantura v3 - The story of Java & HUJAK
Javantura v3 - The story of Java & HUJAKJavantura v3 - The story of Java & HUJAK
Javantura v3 - The story of Java & HUJAK
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
?
Java 8
Java 8Java 8
Java 8
Raghda Salah
?
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
C4Media
?
Join the Java Evolution Portland Oregon
Join the Java Evolution Portland OregonJoin the Java Evolution Portland Oregon
Join the Java Evolution Portland Oregon
Heather VanCura
?
JavaOne Latin America Participate in Shaping Java's Future
JavaOne Latin America Participate in Shaping Java's Future JavaOne Latin America Participate in Shaping Java's Future
JavaOne Latin America Participate in Shaping Java's Future
Heather VanCura
?
Future of Java EE with SE 8 (revised)
Future of Java EE with SE 8 (revised)Future of Java EE with SE 8 (revised)
Future of Java EE with SE 8 (revised)
Hirofumi Iwasaki
?
Join the Java Evolution Columbus Ohio
Join the Java Evolution Columbus OhioJoin the Java Evolution Columbus Ohio
Join the Java Evolution Columbus Ohio
Heather VanCura
?
Join the Java Evolution NYC
Join the Java Evolution NYCJoin the Java Evolution NYC
Join the Java Evolution NYC
Heather VanCura
?
Gaelyk - JFokus 2011 - Guillaume Laforge
Gaelyk - JFokus 2011 - Guillaume LaforgeGaelyk - JFokus 2011 - Guillaume Laforge
Gaelyk - JFokus 2011 - Guillaume Laforge
Guillaume Laforge
?
Devoxx UK BOF session
Devoxx UK BOF sessionDevoxx UK BOF session
Devoxx UK BOF session
Heather VanCura
?
Valencia EMEA Java User Group Summit
Valencia EMEA Java User Group SummitValencia EMEA Java User Group Summit
Valencia EMEA Java User Group Summit
Heather VanCura
?
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
Guillaume Laforge
?
\Մ Groovy c AWS 녶ˑ_l
\Մ Groovy c AWS 녶ˑ_l\Մ Groovy c AWS 녶ˑ_l
\Մ Groovy c AWS 녶ˑ_l
Kyle Lin
?
Pebank java handsout
Pebank java handsoutPebank java handsout
Pebank java handsout
PE-BANK
?
Migration strategies 4
Migration strategies 4Migration strategies 4
Migration strategies 4
Wenhua Wang
?
Join the Java Evolution Coimbra
Join the Java Evolution CoimbraJoin the Java Evolution Coimbra
Join the Java Evolution Coimbra
Heather VanCura
?
ձһϸԱ2011
ձһϸԱ2011ձһϸԱ2011
ձһϸԱ2011
ȱ
?
Jozi-JUG JDK 9 Unconference
Jozi-JUG JDK 9 UnconferenceJozi-JUG JDK 9 Unconference
Jozi-JUG JDK 9 Unconference
Heather VanCura
?
Join the Java Evolution GIDS Bangalore & Pune
Join the Java Evolution GIDS Bangalore & PuneJoin the Java Evolution GIDS Bangalore & Pune
Join the Java Evolution GIDS Bangalore & Pune
Heather VanCura
?
Join the Java Evolution Baltimore/DC/Philly
Join the Java Evolution Baltimore/DC/PhillyJoin the Java Evolution Baltimore/DC/Philly
Join the Java Evolution Baltimore/DC/Philly
Heather VanCura
?
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
C4Media
?
Join the Java Evolution Portland Oregon
Join the Java Evolution Portland OregonJoin the Java Evolution Portland Oregon
Join the Java Evolution Portland Oregon
Heather VanCura
?
JavaOne Latin America Participate in Shaping Java's Future
JavaOne Latin America Participate in Shaping Java's Future JavaOne Latin America Participate in Shaping Java's Future
JavaOne Latin America Participate in Shaping Java's Future
Heather VanCura
?
Future of Java EE with SE 8 (revised)
Future of Java EE with SE 8 (revised)Future of Java EE with SE 8 (revised)
Future of Java EE with SE 8 (revised)
Hirofumi Iwasaki
?
Join the Java Evolution Columbus Ohio
Join the Java Evolution Columbus OhioJoin the Java Evolution Columbus Ohio
Join the Java Evolution Columbus Ohio
Heather VanCura
?
Join the Java Evolution NYC
Join the Java Evolution NYCJoin the Java Evolution NYC
Join the Java Evolution NYC
Heather VanCura
?
Gaelyk - JFokus 2011 - Guillaume Laforge
Gaelyk - JFokus 2011 - Guillaume LaforgeGaelyk - JFokus 2011 - Guillaume Laforge
Gaelyk - JFokus 2011 - Guillaume Laforge
Guillaume Laforge
?
Valencia EMEA Java User Group Summit
Valencia EMEA Java User Group SummitValencia EMEA Java User Group Summit
Valencia EMEA Java User Group Summit
Heather VanCura
?
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
Guillaume Laforge
?
\Մ Groovy c AWS 녶ˑ_l
\Մ Groovy c AWS 녶ˑ_l\Մ Groovy c AWS 녶ˑ_l
\Մ Groovy c AWS 녶ˑ_l
Kyle Lin
?
Pebank java handsout
Pebank java handsoutPebank java handsout
Pebank java handsout
PE-BANK
?
Migration strategies 4
Migration strategies 4Migration strategies 4
Migration strategies 4
Wenhua Wang
?
Join the Java Evolution Coimbra
Join the Java Evolution CoimbraJoin the Java Evolution Coimbra
Join the Java Evolution Coimbra
Heather VanCura
?

Recently uploaded (20)

WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
WSO2
?
"Surfing the IT Waves: How Not to Drown in the Information Ocean", Serhii Nem...
"Surfing the IT Waves: How Not to Drown in the Information Ocean", Serhii Nem..."Surfing the IT Waves: How Not to Drown in the Information Ocean", Serhii Nem...
"Surfing the IT Waves: How Not to Drown in the Information Ocean", Serhii Nem...
Fwdays
?
"Constructive Interaction During Emotional Burnout: With Local and Internatio...
"Constructive Interaction During Emotional Burnout: With Local and Internatio..."Constructive Interaction During Emotional Burnout: With Local and Internatio...
"Constructive Interaction During Emotional Burnout: With Local and Internatio...
Fwdays
?
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on CodeWSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
WSO2
?
[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...
[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...
[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...
Fwdays
?
Large Language Models vs Small Language Models
Large Language Models vs Small Language ModelsLarge Language Models vs Small Language Models
Large Language Models vs Small Language Models
Nathan Bijnens
?
Google News Consideration for SEO | Google Search NYC
Google News Consideration for SEO | Google Search NYCGoogle News Consideration for SEO | Google Search NYC
Google News Consideration for SEO | Google Search NYC
Primary Position
?
AEM Branding Rollout: How to Minimize Downtime & Improve Efficiency
AEM Branding Rollout: How to Minimize Downtime & Improve EfficiencyAEM Branding Rollout: How to Minimize Downtime & Improve Efficiency
AEM Branding Rollout: How to Minimize Downtime & Improve Efficiency
Nikhil Gupta
?
Blending AI in Enterprise Architecture.pdf
Blending AI in Enterprise Architecture.pdfBlending AI in Enterprise Architecture.pdf
Blending AI in Enterprise Architecture.pdf
Calvin Hendryx-Parker
?
L13_ICT_Project_Publication_and_Statistics.ppt
L13_ICT_Project_Publication_and_Statistics.pptL13_ICT_Project_Publication_and_Statistics.ppt
L13_ICT_Project_Publication_and_Statistics.ppt
emilymharlruiz1
?
DevOps 101 - DevOps Columbia 3-20-2025.pdf
DevOps 101 - DevOps Columbia 3-20-2025.pdfDevOps 101 - DevOps Columbia 3-20-2025.pdf
DevOps 101 - DevOps Columbia 3-20-2025.pdf
judy (fink) johnson
?
Best Crane Manufacturers in India Industry Leaders & Innovations.pdf
Best Crane Manufacturers in India Industry Leaders & Innovations.pdfBest Crane Manufacturers in India Industry Leaders & Innovations.pdf
Best Crane Manufacturers in India Industry Leaders & Innovations.pdf
Hercules Hoists
?
AI Agents, such as Autogen at Tide Sprint
AI Agents, such as Autogen at Tide SprintAI Agents, such as Autogen at Tide Sprint
AI Agents, such as Autogen at Tide Sprint
Nathan Bijnens
?
[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...
[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...
[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...
Fwdays
?
Tesla strategy for development in modern era.pptx
Tesla strategy for development in modern era.pptxTesla strategy for development in modern era.pptx
Tesla strategy for development in modern era.pptx
hibahassan160702
?
Spin Glass Models of Neural Networks: The Curie-Weiss Model from Statistical ...
Spin Glass Models of Neural Networks: The Curie-Weiss Model from Statistical ...Spin Glass Models of Neural Networks: The Curie-Weiss Model from Statistical ...
Spin Glass Models of Neural Networks: The Curie-Weiss Model from Statistical ...
Charles Martin
?
Benefits of Using Ultrasonic Level Transmitters for Control
Benefits of Using Ultrasonic Level Transmitters for ControlBenefits of Using Ultrasonic Level Transmitters for Control
Benefits of Using Ultrasonic Level Transmitters for Control
nikeson80
?
Emancipatory Information Retrieval (Invited Talk at UCC)
Emancipatory Information Retrieval (Invited Talk at UCC)Emancipatory Information Retrieval (Invited Talk at UCC)
Emancipatory Information Retrieval (Invited Talk at UCC)
Bhaskar Mitra
?
YEM Pay: A European man in a bank paying with YEM
YEM Pay: A European man in a bank paying with YEMYEM Pay: A European man in a bank paying with YEM
YEM Pay: A European man in a bank paying with YEM
Steve Hodgkiss
?
Slack Social Meetup Connect, Collaborate & Grow!.pptx
Slack Social Meetup Connect, Collaborate & Grow!.pptxSlack Social Meetup Connect, Collaborate & Grow!.pptx
Slack Social Meetup Connect, Collaborate & Grow!.pptx
SanjeetMishra29
?
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
WSO2
?
"Surfing the IT Waves: How Not to Drown in the Information Ocean", Serhii Nem...
"Surfing the IT Waves: How Not to Drown in the Information Ocean", Serhii Nem..."Surfing the IT Waves: How Not to Drown in the Information Ocean", Serhii Nem...
"Surfing the IT Waves: How Not to Drown in the Information Ocean", Serhii Nem...
Fwdays
?
"Constructive Interaction During Emotional Burnout: With Local and Internatio...
"Constructive Interaction During Emotional Burnout: With Local and Internatio..."Constructive Interaction During Emotional Burnout: With Local and Internatio...
"Constructive Interaction During Emotional Burnout: With Local and Internatio...
Fwdays
?
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on CodeWSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
WSO2
?
[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...
[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...
[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...
Fwdays
?
Large Language Models vs Small Language Models
Large Language Models vs Small Language ModelsLarge Language Models vs Small Language Models
Large Language Models vs Small Language Models
Nathan Bijnens
?
Google News Consideration for SEO | Google Search NYC
Google News Consideration for SEO | Google Search NYCGoogle News Consideration for SEO | Google Search NYC
Google News Consideration for SEO | Google Search NYC
Primary Position
?
AEM Branding Rollout: How to Minimize Downtime & Improve Efficiency
AEM Branding Rollout: How to Minimize Downtime & Improve EfficiencyAEM Branding Rollout: How to Minimize Downtime & Improve Efficiency
AEM Branding Rollout: How to Minimize Downtime & Improve Efficiency
Nikhil Gupta
?
Blending AI in Enterprise Architecture.pdf
Blending AI in Enterprise Architecture.pdfBlending AI in Enterprise Architecture.pdf
Blending AI in Enterprise Architecture.pdf
Calvin Hendryx-Parker
?
L13_ICT_Project_Publication_and_Statistics.ppt
L13_ICT_Project_Publication_and_Statistics.pptL13_ICT_Project_Publication_and_Statistics.ppt
L13_ICT_Project_Publication_and_Statistics.ppt
emilymharlruiz1
?
DevOps 101 - DevOps Columbia 3-20-2025.pdf
DevOps 101 - DevOps Columbia 3-20-2025.pdfDevOps 101 - DevOps Columbia 3-20-2025.pdf
DevOps 101 - DevOps Columbia 3-20-2025.pdf
judy (fink) johnson
?
Best Crane Manufacturers in India Industry Leaders & Innovations.pdf
Best Crane Manufacturers in India Industry Leaders & Innovations.pdfBest Crane Manufacturers in India Industry Leaders & Innovations.pdf
Best Crane Manufacturers in India Industry Leaders & Innovations.pdf
Hercules Hoists
?
AI Agents, such as Autogen at Tide Sprint
AI Agents, such as Autogen at Tide SprintAI Agents, such as Autogen at Tide Sprint
AI Agents, such as Autogen at Tide Sprint
Nathan Bijnens
?
[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...
[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...
[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...
Fwdays
?
Tesla strategy for development in modern era.pptx
Tesla strategy for development in modern era.pptxTesla strategy for development in modern era.pptx
Tesla strategy for development in modern era.pptx
hibahassan160702
?
Spin Glass Models of Neural Networks: The Curie-Weiss Model from Statistical ...
Spin Glass Models of Neural Networks: The Curie-Weiss Model from Statistical ...Spin Glass Models of Neural Networks: The Curie-Weiss Model from Statistical ...
Spin Glass Models of Neural Networks: The Curie-Weiss Model from Statistical ...
Charles Martin
?
Benefits of Using Ultrasonic Level Transmitters for Control
Benefits of Using Ultrasonic Level Transmitters for ControlBenefits of Using Ultrasonic Level Transmitters for Control
Benefits of Using Ultrasonic Level Transmitters for Control
nikeson80
?
Emancipatory Information Retrieval (Invited Talk at UCC)
Emancipatory Information Retrieval (Invited Talk at UCC)Emancipatory Information Retrieval (Invited Talk at UCC)
Emancipatory Information Retrieval (Invited Talk at UCC)
Bhaskar Mitra
?
YEM Pay: A European man in a bank paying with YEM
YEM Pay: A European man in a bank paying with YEMYEM Pay: A European man in a bank paying with YEM
YEM Pay: A European man in a bank paying with YEM
Steve Hodgkiss
?
Slack Social Meetup Connect, Collaborate & Grow!.pptx
Slack Social Meetup Connect, Collaborate & Grow!.pptxSlack Social Meetup Connect, Collaborate & Grow!.pptx
Slack Social Meetup Connect, Collaborate & Grow!.pptx
SanjeetMishra29
?

Introduction to Java 8 java.time

  • 1. Java 8 Date Time By Jim Gough @JavaJimLondon
  • 2. Agenda ? ? ? ? ? ? ? Adopt a JSR What exists in Java 7 New Things - The Basics Working with Date and Time Parsing and Formatting Interoperability with java.util.Date Advanced Queries !2
  • 3. Accompanying Materials ? Code along with github project: ? https:/ /github.com/jpgough/JavaTimeLab ! ? More information on my blog: ? http:/ /javajimlondon.blogspot.com/2014/01/ live-coding-on-java-8-date-time-api.html !3
  • 4. LJC/JCP ? LJC elected onto the JCP committee ? JCP (Java Community Process) ? The JCP is the mechanism for developing standard technical speci?cations for the Java technology !4
  • 5. Adopt a JSR ? This is it! JSR-310 is the pilot ? This program is intended to: C Encourage members of the Java Community to get involved in a JSR. C Evangelise that JSR to the wider Java Community community in order to increase grass roots participation C https:/ /java.net/projects/adoptajsr/pages/Home
  • 6. Java Date ? Java Date has been in the language since January 23, 1996 ? Many good discussions about whats wrong with dates ? Mutability ? Date is a DateTime, but there are other classes for SQL ? No Timezones ? Not easy to use !6
  • 7. Calendar ? Still mutable ? Cant format a date directly ? Performing arithmetic operations on dates not clearly supported. For example time between two points !7
  • 8. Example From Its High Time @JavaOne 2008 ? How many bugs in this code?? ? Date date = new Date(2007, 12, 13, 16, 40); ? ? TimeZone zone = TimeZone.getTimeZone("Asia/HongKong");? ? Calendar cal = new GregorianCalendar(date, zone); ? DateFormat fm = new SimpleDateFormat("HH:mm Z");? String str = fm.format(cal); !8
  • 9. Example From Its High Time @JavaOne 2008 ? 6 bugs in the code!? ? Date date = new Date(2007, 12, 13, 16, 40); ? ? TimeZone zone = TimeZone.getTimeZone("Asia/Hong_Kong");? ? Calendar cal = new GregorianCalendar(date, zone); ? DateFormat fm = new SimpleDateFormat("HH:mm Z");? String str = fm.format(cal); !9
  • 10. New Things - The Basics ? New package java.time ? New objects for representing Dates and Time C LocalDate C LocalTime C LocalDateTime C ZonedDateTime !10
  • 11. Working with Date and Time ? Instant - Closest thing to java.util.Date ? Duration C Measure of time. Eg 34.5 seconds ? Period C A date based amount of time. Eg 5 days ? Difference important when working with ZonedDateTime operations. !11
  • 12. Java.util.Date ? java.util.Date is actually closest to Instant ? Now has to toInstant method on ? Examples !12
  • 13. Parsing and Formatting ? DateTimeFormatter ? Nice prede?ned formatters: C DateTimeFormatter.ISO_DATE ? Can build a custom pattern C Some slight modi?cation to patterns ? .format and .parse conveniently on objects. !13