Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Java 8 Date Time Hack Day

1,184 views

Published on

London Java Community evaluation of JSR-310 introduction

Published in: Technology, News & Politics
  • Be the first to comment

  • Be the first to like this

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

×