Java 8 Date Time Hack Day

995 views
881 views

Published on

London Java Community evaluation of JSR-310 introduction

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
995
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Java 8 Date Time Hack Day

    1. 1. Java 8 Date Time Hack DayStephen ColebourneRoger RiggsRichard WarburtonJames Gough
    2. 2. Who are we?• JSR 310 Expert Group • Stephen Colebourne @jodastephen • Roger.Riggs@oracle.com• London Java Community JCP Group • Richard Warburton @RichardWarburto • Jim Gough @JavaJimLondon 2
    3. 3. 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); 3
    4. 4. 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); 4
    5. 5. Introducing Some New Concepts• Core Terms • Date • Time• Usage • Standard • Timezones • By offset • Calendaring Systems• New Date Formatter 5
    6. 6. No More Upfront Help...• The point of today is to see how Java Developers can use and understand the API• The JavaDoc is available at – http://tinyurl.com/310jdoc• Instructors will be around to give help and note down feedback 6
    7. 7. Project Structure (3 Sections)• Basic – Introduction to basic DateTime operations• Explore – Alterations, comparisons and multiple calendars• Project – School holiday exchange task 7
    8. 8. Java Doc & Feedback• JavaDoc:• http://tinyurl.com/310jdoc• Feedback:• http://tinyurl.com/310feedback 8

    ×