ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
LJC/JCP Committee
                         Java Dating
                  By James Gough




Thursday, 14 July 2011
LJC/JCP

          ?      Who am I?

          ?      What is the LJC/JCP?

          ?      Why get involved?




Thursday, 14 July 2011
Who am I?
          ?      James Gough

                ? jpgough@gmail.com
                ? Twitter: goughjam
          ?      Java developer for 8 years, 4 years industry experience

          ?      Work at a large investment bank developing Flex and Java

          ?      Run my own company in spare time developing iOS
                 applications

                                                                   3


Thursday, 14 July 2011
LJC/JCP
          ?      LJC recently elected onto the JCP committee

          ?      JCP (Java Community Process)

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

          ?      Interested? Ben Evans @kittylst on twitter, or
                 ?nd me at the bar on Tuesday


                                                              4


Thursday, 14 July 2011
Why get involved?
          ?      Chance to have a say

          ?      Discover more about Java and the
                 inner workings

          ?      Get involved on projects and
                 contribute to Java directly

          ?      Offered to do a lightning talk
                ?        Coming soon: Java memory pub

                                                        5


Thursday, 14 July 2011
Dates?
          ?      The thing that's bothering me at the
                 moment is dating, there¡¯s several things
                 to be aware of:

                ?        Choosing a good restaurant

                ?        What to wear

                ?        ....

                                                      6


Thursday, 14 July 2011
Java Dates
          ? Java Date and Calendar
          ? Joda Time
          ? JSR-310
                                      7


Thursday, 14 July 2011
Java Date
          ?      Java Date has been in the language since January 23, 1996

          ?      Many good discussions about what¡¯s wrong with dates

          ?      Mutability

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

          ?      No Timezones

          ?      Not easy to use




                                                                   8


Thursday, 14 July 2011
Calendar

          ? Still mutable
          ? Can¡¯t format a date directly

                                           9


Thursday, 14 July 2011
Example From It¡¯s High Time
                              @JavaOne 2008
          ?      How many bugs in this code?

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

                 TimeZone zone = TimeZone.getInstance
                 ("Asia/HongKong");

                 Calendar cal = new GregorianCalendar
                 (date, zone);
                 DateFormat fm = new SimpleDateFormat
                 ("HH:mm Z");
                 String str = fm.format(cal);

                                                  10


Thursday, 14 July 2011
Example From It¡¯s High Time
                              @JavaOne 2008
          ?      6 bugs in the code!

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

                 TimeZone zone = TimeZone.getInstance
                 ("Asia/Hong_Kong");

                 Calendar cal = new GregorianCalendar
                 (date, zone);
                 DateFormat fm = new SimpleDateFormat
                 ("HH:mm Z");
                 String str = fm.format(cal);

                                                  11


Thursday, 14 July 2011
Joda Time
          ?      Instant

                ?        Moment in time, represented by DateTime. DateTime
                         is immutable

          ?      Interval

                ?        An interval of time from one instant to another. Both
                         end points have same Chronology and TimeZone

          ?      Duration

                ?        Duration of time measured in milliseconds. No
                         timezone of chronology applies
                                                                       12


Thursday, 14 July 2011
Joda Time
          ?      Period

                ?        A period of time de?ned in terms of ?elds (e.g. +1 month)

          ?      Chronology

                ?        A calculation engine supporting complex calendar rules

                ?        In most this can be ignored, important to the internal design, but
                         not to the standard user using ISOChronology

          ?      Timezones

                ?        DateTimeZone zone = DateTimeZone.forID
                         ("Europe/London");


                                                                                  13


Thursday, 14 July 2011
JSR-310
          ?      Human/Machine Timelines

                ?        Requirement to have a separation of concerns
                         between human and machine timelines

                ?        DateTime is better thought of as a LocalDateTime and
                         a timezone

          ?      Pluggable Chronology

                ?        Restrict DateTime classes to a single calendar system

          ?      Nulls

                ?        Null means 0 in most cases, ouch!
                                                                        14


Thursday, 14 July 2011
Getting Involved
          ?      ThreeTen is now on GitHub

          ?      Open project that can be contributed to

          ?      A few pull requests have been made since moving to
                 GitHub

          ?      Accept the legal agreement

          ?      Mailing List: threeten-
                 develop@lists.sourceforge.net

                                                                15


Thursday, 14 July 2011
Contact
          ?      James Gough

                ? jpgough@gmail.com
                ? Twitter: goughjam


                                      3
                                      16


Thursday, 14 July 2011

More Related Content

Viewers also liked (19)

Oap
OapOap
Oap
Kompella Kashyap
?
Den¨²ncia da Lava Jato contra Jo?o SantanaDen¨²ncia da Lava Jato contra Jo?o Santana
Den¨²ncia da Lava Jato contra Jo?o Santana
Miguel Rosario
?
§­§à§Ô§Ú§ã§ä§Ú§Ü§Ñ §ß§Ñ §Ñ§å§ä§ã§à§â§ã: §Ô§Ú§Ò§Ü§à§ã§ä§î §Ó §á§Ö§â§Ú§à§Õ §ß§Ö§ã§ä§Ñ§Ò§Ú§Ý§î§ß§à§ã§ä§Ú IForum2014
§­§à§Ô§Ú§ã§ä§Ú§Ü§Ñ §ß§Ñ §Ñ§å§ä§ã§à§â§ã: §Ô§Ú§Ò§Ü§à§ã§ä§î §Ó §á§Ö§â§Ú§à§Õ §ß§Ö§ã§ä§Ñ§Ò§Ú§Ý§î§ß§à§ã§ä§Ú IForum2014§­§à§Ô§Ú§ã§ä§Ú§Ü§Ñ §ß§Ñ §Ñ§å§ä§ã§à§â§ã: §Ô§Ú§Ò§Ü§à§ã§ä§î §Ó §á§Ö§â§Ú§à§Õ §ß§Ö§ã§ä§Ñ§Ò§Ú§Ý§î§ß§à§ã§ä§Ú IForum2014
§­§à§Ô§Ú§ã§ä§Ú§Ü§Ñ §ß§Ñ §Ñ§å§ä§ã§à§â§ã: §Ô§Ú§Ò§Ü§à§ã§ä§î §Ó §á§Ö§â§Ú§à§Õ §ß§Ö§ã§ä§Ñ§Ò§Ú§Ý§î§ß§à§ã§ä§Ú IForum2014
TOCHKA
?
????Croatian Govt, the most communicative government in the world?
????Croatian Govt, the most communicative government in the world?????Croatian Govt, the most communicative government in the world?
????Croatian Govt, the most communicative government in the world?
Tomislav Korman
?
Quest?o de ordem - suspei??o do relator da Comiss?o de ImpeachmentQuest?o de ordem - suspei??o do relator da Comiss?o de Impeachment
Quest?o de ordem - suspei??o do relator da Comiss?o de Impeachment
Miguel Rosario
?
Dicintai alloh dan hamba nya
Dicintai alloh dan hamba nyaDicintai alloh dan hamba nya
Dicintai alloh dan hamba nya
Yusuf Santoso
?
Notam 30 07-15Notam 30 07-15
Notam 30 07-15
Carlos Carvalho
?
Assets models seminar
Assets models seminarAssets models seminar
Assets models seminar
Michael Shepherd
?
Kudavi 2.29.2016
Kudavi 2.29.2016Kudavi 2.29.2016
Kudavi 2.29.2016
Tom Currier
?
Extensive sampling of basidiomycete genomes demonstrates inadequacy of the wh...
Extensive sampling of basidiomycete genomes demonstrates inadequacy of the wh...Extensive sampling of basidiomycete genomes demonstrates inadequacy of the wh...
Extensive sampling of basidiomycete genomes demonstrates inadequacy of the wh...
Gomez Garc¨ªa
?
Oap
OapOap
Oap
Kompella Kashyap
?
Como ler a b¨ªbliaComo ler a b¨ªblia
Como ler a b¨ªblia
Jadson Santos de Sousa
?
Online branding for schools
Online branding for schoolsOnline branding for schools
Online branding for schools
Rather Inventive
?
Harnessing the Motivation Wave
Harnessing the Motivation WaveHarnessing the Motivation Wave
Harnessing the Motivation Wave
Angad Singh
?
Insights and opportunities
Insights and opportunitiesInsights and opportunities
Insights and opportunities
Kompella Kashyap
?
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSTek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Pablo Godel
?
Homes
HomesHomes
Homes
jasmina ivanova
?
Den¨²ncia da Lava Jato contra Jo?o SantanaDen¨²ncia da Lava Jato contra Jo?o Santana
Den¨²ncia da Lava Jato contra Jo?o Santana
Miguel Rosario
?
§­§à§Ô§Ú§ã§ä§Ú§Ü§Ñ §ß§Ñ §Ñ§å§ä§ã§à§â§ã: §Ô§Ú§Ò§Ü§à§ã§ä§î §Ó §á§Ö§â§Ú§à§Õ §ß§Ö§ã§ä§Ñ§Ò§Ú§Ý§î§ß§à§ã§ä§Ú IForum2014
§­§à§Ô§Ú§ã§ä§Ú§Ü§Ñ §ß§Ñ §Ñ§å§ä§ã§à§â§ã: §Ô§Ú§Ò§Ü§à§ã§ä§î §Ó §á§Ö§â§Ú§à§Õ §ß§Ö§ã§ä§Ñ§Ò§Ú§Ý§î§ß§à§ã§ä§Ú IForum2014§­§à§Ô§Ú§ã§ä§Ú§Ü§Ñ §ß§Ñ §Ñ§å§ä§ã§à§â§ã: §Ô§Ú§Ò§Ü§à§ã§ä§î §Ó §á§Ö§â§Ú§à§Õ §ß§Ö§ã§ä§Ñ§Ò§Ú§Ý§î§ß§à§ã§ä§Ú IForum2014
§­§à§Ô§Ú§ã§ä§Ú§Ü§Ñ §ß§Ñ §Ñ§å§ä§ã§à§â§ã: §Ô§Ú§Ò§Ü§à§ã§ä§î §Ó §á§Ö§â§Ú§à§Õ §ß§Ö§ã§ä§Ñ§Ò§Ú§Ý§î§ß§à§ã§ä§Ú IForum2014
TOCHKA
?
????Croatian Govt, the most communicative government in the world?
????Croatian Govt, the most communicative government in the world?????Croatian Govt, the most communicative government in the world?
????Croatian Govt, the most communicative government in the world?
Tomislav Korman
?
Quest?o de ordem - suspei??o do relator da Comiss?o de ImpeachmentQuest?o de ordem - suspei??o do relator da Comiss?o de Impeachment
Quest?o de ordem - suspei??o do relator da Comiss?o de Impeachment
Miguel Rosario
?
Dicintai alloh dan hamba nya
Dicintai alloh dan hamba nyaDicintai alloh dan hamba nya
Dicintai alloh dan hamba nya
Yusuf Santoso
?
Notam 30 07-15Notam 30 07-15
Notam 30 07-15
Carlos Carvalho
?
Extensive sampling of basidiomycete genomes demonstrates inadequacy of the wh...
Extensive sampling of basidiomycete genomes demonstrates inadequacy of the wh...Extensive sampling of basidiomycete genomes demonstrates inadequacy of the wh...
Extensive sampling of basidiomycete genomes demonstrates inadequacy of the wh...
Gomez Garc¨ªa
?
Como ler a b¨ªbliaComo ler a b¨ªblia
Como ler a b¨ªblia
Jadson Santos de Sousa
?
Harnessing the Motivation Wave
Harnessing the Motivation WaveHarnessing the Motivation Wave
Harnessing the Motivation Wave
Angad Singh
?
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSTek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Pablo Godel
?

Recently uploaded (20)

A Framework for Model-Driven Digital Twin Engineering
A Framework for Model-Driven Digital Twin EngineeringA Framework for Model-Driven Digital Twin Engineering
A Framework for Model-Driven Digital Twin Engineering
Daniel Lehner
?
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
ScyllaDB
?
Understanding Traditional AI with Custom Vision & MuleSoft.pptx
Understanding Traditional AI with Custom Vision & MuleSoft.pptxUnderstanding Traditional AI with Custom Vision & MuleSoft.pptx
Understanding Traditional AI with Custom Vision & MuleSoft.pptx
shyamraj55
?
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
Tsuyoshi Hirayama
?
Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)
nick896721
?
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOTSMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
TanmaiArni
?
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog GavraReplacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
ScyllaDB
?
Gojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptxGojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptx
V3cube
?
BoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is DynamicBoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is Dynamic
Ortus Solutions, Corp
?
30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...
30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...
30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...
ScyllaDB
?
Computational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the WorldComputational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the World
HusseinMalikMammadli
?
Revolutionizing-Government-Communication-The-OSWAN-Success-Story
Revolutionizing-Government-Communication-The-OSWAN-Success-StoryRevolutionizing-Government-Communication-The-OSWAN-Success-Story
Revolutionizing-Government-Communication-The-OSWAN-Success-Story
ssuser52ad5e
?
Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Stronger Together: Combining Data Quality and Governance for Confident AI & A...Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Precisely
?
World Information Architecture Day 2025 - UX at a Crossroads
World Information Architecture Day 2025 - UX at a CrossroadsWorld Information Architecture Day 2025 - UX at a Crossroads
World Information Architecture Day 2025 - UX at a Crossroads
Joshua Randall
?
Unlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & KeylockUnlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & Keylock
HusseinMalikMammadli
?
Technology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptxTechnology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptx
kaylagaze
?
Cloud of everything Tech of the 21 century in Aviation
Cloud of everything Tech of the 21 century in AviationCloud of everything Tech of the 21 century in Aviation
Cloud of everything Tech of the 21 century in Aviation
Assem mousa
?
TrustArc Webinar - Building your DPIA/PIA Program: Best Practices & Tips
TrustArc Webinar - Building your DPIA/PIA Program: Best Practices & TipsTrustArc Webinar - Building your DPIA/PIA Program: Best Practices & Tips
TrustArc Webinar - Building your DPIA/PIA Program: Best Practices & Tips
TrustArc
?
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramentoAIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
Alessandro Bogliolo
?
Integrated Operating Window - A Gateway to PM
Integrated Operating Window - A Gateway to PMIntegrated Operating Window - A Gateway to PM
Integrated Operating Window - A Gateway to PM
Farhan Tariq
?
A Framework for Model-Driven Digital Twin Engineering
A Framework for Model-Driven Digital Twin EngineeringA Framework for Model-Driven Digital Twin Engineering
A Framework for Model-Driven Digital Twin Engineering
Daniel Lehner
?
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
ScyllaDB
?
Understanding Traditional AI with Custom Vision & MuleSoft.pptx
Understanding Traditional AI with Custom Vision & MuleSoft.pptxUnderstanding Traditional AI with Custom Vision & MuleSoft.pptx
Understanding Traditional AI with Custom Vision & MuleSoft.pptx
shyamraj55
?
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
Tsuyoshi Hirayama
?
Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)
nick896721
?
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOTSMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
TanmaiArni
?
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog GavraReplacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
ScyllaDB
?
Gojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptxGojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptx
V3cube
?
BoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is DynamicBoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is Dynamic
Ortus Solutions, Corp
?
30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...
30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...
30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...
ScyllaDB
?
Computational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the WorldComputational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the World
HusseinMalikMammadli
?
Revolutionizing-Government-Communication-The-OSWAN-Success-Story
Revolutionizing-Government-Communication-The-OSWAN-Success-StoryRevolutionizing-Government-Communication-The-OSWAN-Success-Story
Revolutionizing-Government-Communication-The-OSWAN-Success-Story
ssuser52ad5e
?
Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Stronger Together: Combining Data Quality and Governance for Confident AI & A...Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Precisely
?
World Information Architecture Day 2025 - UX at a Crossroads
World Information Architecture Day 2025 - UX at a CrossroadsWorld Information Architecture Day 2025 - UX at a Crossroads
World Information Architecture Day 2025 - UX at a Crossroads
Joshua Randall
?
Unlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & KeylockUnlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & Keylock
HusseinMalikMammadli
?
Technology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptxTechnology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptx
kaylagaze
?
Cloud of everything Tech of the 21 century in Aviation
Cloud of everything Tech of the 21 century in AviationCloud of everything Tech of the 21 century in Aviation
Cloud of everything Tech of the 21 century in Aviation
Assem mousa
?
TrustArc Webinar - Building your DPIA/PIA Program: Best Practices & Tips
TrustArc Webinar - Building your DPIA/PIA Program: Best Practices & TipsTrustArc Webinar - Building your DPIA/PIA Program: Best Practices & Tips
TrustArc Webinar - Building your DPIA/PIA Program: Best Practices & Tips
TrustArc
?
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramentoAIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
Alessandro Bogliolo
?
Integrated Operating Window - A Gateway to PM
Integrated Operating Window - A Gateway to PMIntegrated Operating Window - A Gateway to PM
Integrated Operating Window - A Gateway to PM
Farhan Tariq
?

Java Dating - JSR 310 Lightning Talk

  • 1. LJC/JCP Committee Java Dating By James Gough Thursday, 14 July 2011
  • 2. LJC/JCP ? Who am I? ? What is the LJC/JCP? ? Why get involved? Thursday, 14 July 2011
  • 3. Who am I? ? James Gough ? jpgough@gmail.com ? Twitter: goughjam ? Java developer for 8 years, 4 years industry experience ? Work at a large investment bank developing Flex and Java ? Run my own company in spare time developing iOS applications 3 Thursday, 14 July 2011
  • 4. LJC/JCP ? LJC recently elected onto the JCP committee ? JCP (Java Community Process) ? The JCP is the mechanism for developing standard technical speci?cations for the Java technology ? Interested? Ben Evans @kittylst on twitter, or ?nd me at the bar on Tuesday 4 Thursday, 14 July 2011
  • 5. Why get involved? ? Chance to have a say ? Discover more about Java and the inner workings ? Get involved on projects and contribute to Java directly ? Offered to do a lightning talk ? Coming soon: Java memory pub 5 Thursday, 14 July 2011
  • 6. Dates? ? The thing that's bothering me at the moment is dating, there¡¯s several things to be aware of: ? Choosing a good restaurant ? What to wear ? .... 6 Thursday, 14 July 2011
  • 7. Java Dates ? Java Date and Calendar ? Joda Time ? JSR-310 7 Thursday, 14 July 2011
  • 8. Java Date ? Java Date has been in the language since January 23, 1996 ? Many good discussions about what¡¯s wrong with dates ? Mutability ? Date is a DateTime, but there are other classes for SQL ? No Timezones ? Not easy to use 8 Thursday, 14 July 2011
  • 9. Calendar ? Still mutable ? Can¡¯t format a date directly 9 Thursday, 14 July 2011
  • 10. Example From It¡¯s High Time @JavaOne 2008 ? How many bugs in this code? Date date = new Date(2007, 12, 13, 16, 40); TimeZone zone = TimeZone.getInstance ("Asia/HongKong"); Calendar cal = new GregorianCalendar (date, zone); DateFormat fm = new SimpleDateFormat ("HH:mm Z"); String str = fm.format(cal); 10 Thursday, 14 July 2011
  • 11. Example From It¡¯s High Time @JavaOne 2008 ? 6 bugs in the code! Date date = new Date(2007, 12, 13, 16, 40); TimeZone zone = TimeZone.getInstance ("Asia/Hong_Kong"); Calendar cal = new GregorianCalendar (date, zone); DateFormat fm = new SimpleDateFormat ("HH:mm Z"); String str = fm.format(cal); 11 Thursday, 14 July 2011
  • 12. Joda Time ? Instant ? Moment in time, represented by DateTime. DateTime is immutable ? Interval ? An interval of time from one instant to another. Both end points have same Chronology and TimeZone ? Duration ? Duration of time measured in milliseconds. No timezone of chronology applies 12 Thursday, 14 July 2011
  • 13. Joda Time ? Period ? A period of time de?ned in terms of ?elds (e.g. +1 month) ? Chronology ? A calculation engine supporting complex calendar rules ? In most this can be ignored, important to the internal design, but not to the standard user using ISOChronology ? Timezones ? DateTimeZone zone = DateTimeZone.forID ("Europe/London"); 13 Thursday, 14 July 2011
  • 14. JSR-310 ? Human/Machine Timelines ? Requirement to have a separation of concerns between human and machine timelines ? DateTime is better thought of as a LocalDateTime and a timezone ? Pluggable Chronology ? Restrict DateTime classes to a single calendar system ? Nulls ? Null means 0 in most cases, ouch! 14 Thursday, 14 July 2011
  • 15. Getting Involved ? ThreeTen is now on GitHub ? Open project that can be contributed to ? A few pull requests have been made since moving to GitHub ? Accept the legal agreement ? Mailing List: threeten- develop@lists.sourceforge.net 15 Thursday, 14 July 2011
  • 16. Contact ? James Gough ? jpgough@gmail.com ? Twitter: goughjam 3 16 Thursday, 14 July 2011