SlideShare ist ein Scribd-Unternehmen logo
1 von 23
A New Object-Oriented Model
of the Gregorian Calendar
Hernán Wilkinson*
Mercap Development Manager
Tacuarí 202, 7mo Piso
C1071AAF, Buenos Aires, Argentina
54-11-4878-1118 (ext. 120)
h.wilkinson@mercapsoftware.com
Máximo Prieto**
Lifia – Facultad de Informática
Universidad Nacional de La Plata
cc11, 1900, La Plata, Argentina
+54 221 422-8252 (ext. 215)
maximo.prieto@lifia.info.unlp.edu.ar
Luciano Romeo
Mercap Software Architect
Tacuarí 202, 7mo Piso
C1071AAF, Buenos Aires, Argentina
54-11-4878-1118
l.romeo@mercapsoftware.com
* Also Universidad de Buenos Aires, UBA, Argentina
** Also Universidad Nacional de la Patagonia Austral, Unidad Académica Caleta Olivia (UNPA-UACO)
Problem Presentation
 Time Domain is pervasive
 Cross Cutting
 Related with Financial Domain
 Related with almost every Domain…
 We concentrated our work on the
Gregorian Calendar
Gregorian Calendar
 Main Design Challenges
 Irregularity

Months have 28,29, 30 or 31 days
 Leap years

Associated with natural events (i.e. day/nigth, seasons, earth
movement, etc.)
 Comparing

January < July

January first < February twentyninth

3 months < 1 year or 5 days < 1 week
 Distance

(January distanceTo: July) = (January, 2005 distanceTo: July, 2005)
 Time line filtering

workingDays includes: (January first, 2005)

workingDays from: (April first, 2005) to: (April thirty, 2005)

14 days from: (April first, 2005) counting: workingDays
Current Models’ Limitations
 Lack of abstractions
 Smalltalk-80: #Monday < #Friday (It returns false)
 Abstractions not matching reality
 Squeak: Date dates (There are no days in a date time…)
 Some models have one, or a few, general purpose abstractions
 aCalendar.set ( Calendar.MONTH, 1) (Does this mean January?)
 Calendar.getInstance () (Are calendar a singleton?)
 These problems show lack of understanding, they provide a poor
domain language, therefore:
 It is difficult to express common situations with them
 They are difficult to learn
 They offer different possible interpretations
 These problems imply:
 Ad-hoc implementations
 Code duplication
 Error prone situations
Matching Reality
RRMM
April first
01/01/2005
April 2005
01/01/2005
?
?
Smalltalk-80
RRMM
April first
01/01/2005
April 2005
Java / .Net
aCalendar
RRMM
01/01/2005
April 2005
01/01/2005
Squeak
April 2005
RRMM
April first
01/01/2005
April 2005
01/01/2005
The Best Solution
April first
April 2005
Our Metaphor
Year
2005
Year
2007
Year
2003Year Granularity
Jan.
2005
Dec.
2005
Zoom
in
July
2005
Month of Year
Granularity
15/07/05
00:00:00
15/07/05
23:59:59
Zoom
in
15/07/05
12:00:00
Date Time
Granularity
01/07/05 31/07/05
Zoom
in
Date Granularity
15/07/05
Main Abstraction
Year Granularity
GregorianYear number: 2005.
Y2005
GregorianYear number: 2004.
Y2004
Month of Year Granularity
y2005 april April, 2005 April of: 2005
April2005
AprilY2005
Date Granularity
April first, 2005
01/04/2005
1April2005
Date Granularity
14 days
from: (April first, 2005)
counting: workingDays
aRelDate
workingDays
01/04/2005
aTimespan
14 days
Date Time Granularity
(April first, 2005) atNoon
01/04/2005 12:00:00
aDateTime
Recurrent Time Entities
 Month
FebruaryJanuary April
Recurrent Time Entities
 Day of Month
 January first
 December twentyFifth
 Day of Week
 Monday
 Tuesday
 Time of Day
 TimeOfDay noon
 TimeOfDay hours: 10 minutes: 11
Time measurements and
Their Relevance
January distanceTo: February January, 2005 distanceTo: February, 2005
(GregorianYear number: 2000) distanceTo: (GregorianYear number: 2005)
1 month
5 years year
month
1
5
Measurements
 Generic Model
 Will be presented at OOPSLA 2005
 Examples:
 1 year + 6 months  18 months
 3 months + 5 days  3 months + 5 days (A “Bag”)
 5 days + 3 weeks  26 days
 1 day + 1 hour  25 hours
 0.10 / 1 year  Yearly Interest Rate of 10 %
 40 km / 1 hour  Speed
 40 km / 1 hour * 2 hours  80 km
Time Units
year
month
centurydecade week
day
minutehour
second millisec.
Base Units
Derived Units
 Gregorian calendar irregularity
Intervals
anInterval
Jan2005
January, 2005 to: November, 2006 by: 2 months
Nov2006
2 month
Segments
01/01/2005
15 days
theEndOfTimetheBeginningOfTime
-15 days
aTimespan
 Absolute and Relative
Time Line Filtering
14 days
from: (April first, 2005)
counting: workingDays
aRelDate
workingDays
01/04/2005
aTimespan
14 days
nonWorkDys
Conclusions
 Object model of the Gregorian calendar
 Metaphor: Different resolution points of the time line
 Total order between time points
 Distance
 Move from one point to another
 Move between points of different resolution
 Representation of time line segments and intervals
 Generic Measurement Model to reify Time Measurements
 Time line filtering allows Relative points in time
 Abstractions for time entities such as a day, a day of a
month and months.
Future Work
 Time zone support
 Expand Timespan protocol
 New abstractions like Hour, Minute, etc.
(not units)
 Reify time lines
 Allow relative points of any granularity
Questions

Weitere ähnliche Inhalte

Andere mochten auch

Programming Language Technical debt and their influence in Thinking and Desgin
Programming Language Technical debt and their influence in Thinking and DesginProgramming Language Technical debt and their influence in Thinking and Desgin
Programming Language Technical debt and their influence in Thinking and DesginHernan Wilkinson
 
Objects: The Misunderstood Paradigm
Objects: The Misunderstood ParadigmObjects: The Misunderstood Paradigm
Objects: The Misunderstood ParadigmHernan Wilkinson
 
Confianza+Participación+Transparencia= Refactorizando la empresa
Confianza+Participación+Transparencia= Refactorizando la empresaConfianza+Participación+Transparencia= Refactorizando la empresa
Confianza+Participación+Transparencia= Refactorizando la empresaHernan Wilkinson
 
Como hacer tdd y no morir en el intento
Como hacer tdd y no morir en el intentoComo hacer tdd y no morir en el intento
Como hacer tdd y no morir en el intentoHernan Wilkinson
 
Obejct Oriented SCM - OOSCM
Obejct Oriented SCM - OOSCMObejct Oriented SCM - OOSCM
Obejct Oriented SCM - OOSCMHernan Wilkinson
 
Los diez mandamientos de TDD
Los diez mandamientos de TDDLos diez mandamientos de TDD
Los diez mandamientos de TDDHernan Wilkinson
 
Think Like a Programmer
Think Like a ProgrammerThink Like a Programmer
Think Like a Programmerdaoswald
 
Eliminando la brecha entre clientes y desarrolladores mediante BDD
Eliminando la brecha entre clientes y desarrolladores mediante BDDEliminando la brecha entre clientes y desarrolladores mediante BDD
Eliminando la brecha entre clientes y desarrolladores mediante BDDJorge Gamba
 
Encadenamiento de refactorings para generar cambios Agiles de Diseño
Encadenamiento de refactorings para generar cambios Agiles de DiseñoEncadenamiento de refactorings para generar cambios Agiles de Diseño
Encadenamiento de refactorings para generar cambios Agiles de DiseñoHernan Wilkinson
 
Cómo Java afecta nuestros Diseños
Cómo Java afecta nuestros DiseñosCómo Java afecta nuestros Diseños
Cómo Java afecta nuestros DiseñosHernan Wilkinson
 
Refactoring a Company - 2nd Presentation
Refactoring a Company - 2nd PresentationRefactoring a Company - 2nd Presentation
Refactoring a Company - 2nd PresentationHernan Wilkinson
 
The ten commandments of TDD
The ten commandments of TDDThe ten commandments of TDD
The ten commandments of TDDHernan Wilkinson
 
Facilitadores asombrosos: logrando mejores conversaciones e interacciones
Facilitadores asombrosos: logrando mejores conversaciones e interaccionesFacilitadores asombrosos: logrando mejores conversaciones e interacciones
Facilitadores asombrosos: logrando mejores conversaciones e interaccionesJuliana Betancur
 
Introducción a Agile y Scrum
Introducción a Agile y ScrumIntroducción a Agile y Scrum
Introducción a Agile y ScrumJohnny Ordóñez
 

Andere mochten auch (20)

Programming Language Technical debt and their influence in Thinking and Desgin
Programming Language Technical debt and their influence in Thinking and DesginProgramming Language Technical debt and their influence in Thinking and Desgin
Programming Language Technical debt and their influence in Thinking and Desgin
 
Objects: The Misunderstood Paradigm
Objects: The Misunderstood ParadigmObjects: The Misunderstood Paradigm
Objects: The Misunderstood Paradigm
 
Confianza+Participación+Transparencia= Refactorizando la empresa
Confianza+Participación+Transparencia= Refactorizando la empresaConfianza+Participación+Transparencia= Refactorizando la empresa
Confianza+Participación+Transparencia= Refactorizando la empresa
 
Como hacer tdd y no morir en el intento
Como hacer tdd y no morir en el intentoComo hacer tdd y no morir en el intento
Como hacer tdd y no morir en el intento
 
Obejct Oriented SCM - OOSCM
Obejct Oriented SCM - OOSCMObejct Oriented SCM - OOSCM
Obejct Oriented SCM - OOSCM
 
Los diez mandamientos de TDD
Los diez mandamientos de TDDLos diez mandamientos de TDD
Los diez mandamientos de TDD
 
Things programmers know
Things programmers knowThings programmers know
Things programmers know
 
Think Like a Programmer
Think Like a ProgrammerThink Like a Programmer
Think Like a Programmer
 
Eliminando la brecha entre clientes y desarrolladores mediante BDD
Eliminando la brecha entre clientes y desarrolladores mediante BDDEliminando la brecha entre clientes y desarrolladores mediante BDD
Eliminando la brecha entre clientes y desarrolladores mediante BDD
 
Tdd on the rocks
Tdd on the rocks Tdd on the rocks
Tdd on the rocks
 
Encadenamiento de refactorings para generar cambios Agiles de Diseño
Encadenamiento de refactorings para generar cambios Agiles de DiseñoEncadenamiento de refactorings para generar cambios Agiles de Diseño
Encadenamiento de refactorings para generar cambios Agiles de Diseño
 
Cómo Java afecta nuestros Diseños
Cómo Java afecta nuestros DiseñosCómo Java afecta nuestros Diseños
Cómo Java afecta nuestros Diseños
 
Tdd con Angular y jasmine
Tdd con Angular y jasmineTdd con Angular y jasmine
Tdd con Angular y jasmine
 
Refactoring a Company - 2nd Presentation
Refactoring a Company - 2nd PresentationRefactoring a Company - 2nd Presentation
Refactoring a Company - 2nd Presentation
 
The ten commandments of TDD
The ten commandments of TDDThe ten commandments of TDD
The ten commandments of TDD
 
Facilitadores asombrosos: logrando mejores conversaciones e interacciones
Facilitadores asombrosos: logrando mejores conversaciones e interaccionesFacilitadores asombrosos: logrando mejores conversaciones e interacciones
Facilitadores asombrosos: logrando mejores conversaciones e interacciones
 
Metaprogramacion
MetaprogramacionMetaprogramacion
Metaprogramacion
 
Algorithms KS1 & KS2
Algorithms KS1 & KS2Algorithms KS1 & KS2
Algorithms KS1 & KS2
 
Introducción a Agile y Scrum
Introducción a Agile y ScrumIntroducción a Agile y Scrum
Introducción a Agile y Scrum
 
Opening smalltalks 2013
Opening smalltalks 2013Opening smalltalks 2013
Opening smalltalks 2013
 

Ähnlich wie A new object oriented model of the gregorian calendar

Dates and Times in Java 7 and Java 8
Dates and Times in Java 7 and Java 8Dates and Times in Java 7 and Java 8
Dates and Times in Java 7 and Java 8Fulvio Corno
 
Data Wrangling: Working with Date / Time Data and Visualizing It
Data Wrangling: Working with Date / Time Data and Visualizing ItData Wrangling: Working with Date / Time Data and Visualizing It
Data Wrangling: Working with Date / Time Data and Visualizing Itkanaugust
 
Java 8 Date and Time API
Java 8 Date and Time APIJava 8 Date and Time API
Java 8 Date and Time APISualeh Fatehi
 
SessionSeven_WorkingWithDatesandTime
SessionSeven_WorkingWithDatesandTimeSessionSeven_WorkingWithDatesandTime
SessionSeven_WorkingWithDatesandTimeHellen Gakuruh
 
TSQL Functions (SQL Server)
TSQL Functions (SQL Server)TSQL Functions (SQL Server)
TSQL Functions (SQL Server)Steve Stedman
 

Ähnlich wie A new object oriented model of the gregorian calendar (6)

Dates and Times in Java 7 and Java 8
Dates and Times in Java 7 and Java 8Dates and Times in Java 7 and Java 8
Dates and Times in Java 7 and Java 8
 
Data Wrangling: Working with Date / Time Data and Visualizing It
Data Wrangling: Working with Date / Time Data and Visualizing ItData Wrangling: Working with Date / Time Data and Visualizing It
Data Wrangling: Working with Date / Time Data and Visualizing It
 
Java 8 Date and Time API
Java 8 Date and Time APIJava 8 Date and Time API
Java 8 Date and Time API
 
SessionSeven_WorkingWithDatesandTime
SessionSeven_WorkingWithDatesandTimeSessionSeven_WorkingWithDatesandTime
SessionSeven_WorkingWithDatesandTime
 
TSQL Functions (SQL Server)
TSQL Functions (SQL Server)TSQL Functions (SQL Server)
TSQL Functions (SQL Server)
 
Java 8 date & time api
Java 8 date & time apiJava 8 date & time api
Java 8 date & time api
 

Mehr von Hernan Wilkinson

Hacia una síntesis de diseño a partir de entender qué es modelar con software
Hacia una síntesis de diseño a partir de entender qué es modelar con softwareHacia una síntesis de diseño a partir de entender qué es modelar con software
Hacia una síntesis de diseño a partir de entender qué es modelar con softwareHernan Wilkinson
 
Live Typing - California Smalltalkers
Live Typing - California SmalltalkersLive Typing - California Smalltalkers
Live Typing - California SmalltalkersHernan Wilkinson
 
Buenos Aires vs. (London vs. Chicago) Agiles 2020
Buenos Aires vs. (London vs. Chicago) Agiles 2020Buenos Aires vs. (London vs. Chicago) Agiles 2020
Buenos Aires vs. (London vs. Chicago) Agiles 2020Hernan Wilkinson
 
LiveTyping - Anotación automática de tipos para lenguajes dinámicos
LiveTyping - Anotación automática de tipos para lenguajes dinámicosLiveTyping - Anotación automática de tipos para lenguajes dinámicos
LiveTyping - Anotación automática de tipos para lenguajes dinámicosHernan Wilkinson
 
LiveTyping: Update and What is next
LiveTyping: Update and What is nextLiveTyping: Update and What is next
LiveTyping: Update and What is nextHernan Wilkinson
 
Cuis smalltalk past present and future
Cuis smalltalk past present and futureCuis smalltalk past present and future
Cuis smalltalk past present and futureHernan Wilkinson
 
Live Typing - Automatic Type Annotation that improves the Programming eXperie...
Live Typing- Automatic Type Annotation that improves the Programming eXperie...Live Typing- Automatic Type Annotation that improves the Programming eXperie...
Live Typing - Automatic Type Annotation that improves the Programming eXperie...Hernan Wilkinson
 
El Desarrollo de Software como debería Ser - PyConAr 2018
El Desarrollo de Software como debería Ser - PyConAr 2018El Desarrollo de Software como debería Ser - PyConAr 2018
El Desarrollo de Software como debería Ser - PyConAr 2018Hernan Wilkinson
 
Lessons Learned Implementing Refactorings
Lessons Learned Implementing RefactoringsLessons Learned Implementing Refactorings
Lessons Learned Implementing RefactoringsHernan Wilkinson
 
El Desarrollo de Software como debería Ser - Nerdear.la 2018
El Desarrollo de Software como debería Ser - Nerdear.la 2018El Desarrollo de Software como debería Ser - Nerdear.la 2018
El Desarrollo de Software como debería Ser - Nerdear.la 2018Hernan Wilkinson
 
El Desarrollo de Software como debería Ser
El Desarrollo de Software como debería SerEl Desarrollo de Software como debería Ser
El Desarrollo de Software como debería SerHernan Wilkinson
 
Go/Ruby/Java: What's next?
Go/Ruby/Java: What's next?Go/Ruby/Java: What's next?
Go/Ruby/Java: What's next?Hernan Wilkinson
 
Exceptions: Why, When, How and Where!
Exceptions: Why, When, How and Where!Exceptions: Why, When, How and Where!
Exceptions: Why, When, How and Where!Hernan Wilkinson
 

Mehr von Hernan Wilkinson (17)

Hacia una síntesis de diseño a partir de entender qué es modelar con software
Hacia una síntesis de diseño a partir de entender qué es modelar con softwareHacia una síntesis de diseño a partir de entender qué es modelar con software
Hacia una síntesis de diseño a partir de entender qué es modelar con software
 
Live Typing - California Smalltalkers
Live Typing - California SmalltalkersLive Typing - California Smalltalkers
Live Typing - California Smalltalkers
 
Buenos Aires vs. (London vs. Chicago) Agiles 2020
Buenos Aires vs. (London vs. Chicago) Agiles 2020Buenos Aires vs. (London vs. Chicago) Agiles 2020
Buenos Aires vs. (London vs. Chicago) Agiles 2020
 
LiveTyping - Anotación automática de tipos para lenguajes dinámicos
LiveTyping - Anotación automática de tipos para lenguajes dinámicosLiveTyping - Anotación automática de tipos para lenguajes dinámicos
LiveTyping - Anotación automática de tipos para lenguajes dinámicos
 
LiveTyping: Update and What is next
LiveTyping: Update and What is nextLiveTyping: Update and What is next
LiveTyping: Update and What is next
 
Cuis smalltalk past present and future
Cuis smalltalk past present and futureCuis smalltalk past present and future
Cuis smalltalk past present and future
 
Live Typing - Automatic Type Annotation that improves the Programming eXperie...
Live Typing- Automatic Type Annotation that improves the Programming eXperie...Live Typing- Automatic Type Annotation that improves the Programming eXperie...
Live Typing - Automatic Type Annotation that improves the Programming eXperie...
 
El Desarrollo de Software como debería Ser - PyConAr 2018
El Desarrollo de Software como debería Ser - PyConAr 2018El Desarrollo de Software como debería Ser - PyConAr 2018
El Desarrollo de Software como debería Ser - PyConAr 2018
 
Lessons Learned Implementing Refactorings
Lessons Learned Implementing RefactoringsLessons Learned Implementing Refactorings
Lessons Learned Implementing Refactorings
 
Dynamic Type Information
Dynamic Type InformationDynamic Type Information
Dynamic Type Information
 
El Desarrollo de Software como debería Ser - Nerdear.la 2018
El Desarrollo de Software como debería Ser - Nerdear.la 2018El Desarrollo de Software como debería Ser - Nerdear.la 2018
El Desarrollo de Software como debería Ser - Nerdear.la 2018
 
El Desarrollo de Software como debería Ser
El Desarrollo de Software como debería SerEl Desarrollo de Software como debería Ser
El Desarrollo de Software como debería Ser
 
TDD & Refactoring
TDD & RefactoringTDD & Refactoring
TDD & Refactoring
 
Go/Ruby/Java: What's next?
Go/Ruby/Java: What's next?Go/Ruby/Java: What's next?
Go/Ruby/Java: What's next?
 
Exceptions: Why, When, How and Where!
Exceptions: Why, When, How and Where!Exceptions: Why, When, How and Where!
Exceptions: Why, When, How and Where!
 
CuisUniversity
CuisUniversityCuisUniversity
CuisUniversity
 
Oop is not Dead
Oop is not DeadOop is not Dead
Oop is not Dead
 

Kürzlich hochgeladen

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 

Kürzlich hochgeladen (20)

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 

A new object oriented model of the gregorian calendar

  • 1. A New Object-Oriented Model of the Gregorian Calendar Hernán Wilkinson* Mercap Development Manager Tacuarí 202, 7mo Piso C1071AAF, Buenos Aires, Argentina 54-11-4878-1118 (ext. 120) h.wilkinson@mercapsoftware.com Máximo Prieto** Lifia – Facultad de Informática Universidad Nacional de La Plata cc11, 1900, La Plata, Argentina +54 221 422-8252 (ext. 215) maximo.prieto@lifia.info.unlp.edu.ar Luciano Romeo Mercap Software Architect Tacuarí 202, 7mo Piso C1071AAF, Buenos Aires, Argentina 54-11-4878-1118 l.romeo@mercapsoftware.com * Also Universidad de Buenos Aires, UBA, Argentina ** Also Universidad Nacional de la Patagonia Austral, Unidad Académica Caleta Olivia (UNPA-UACO)
  • 2. Problem Presentation  Time Domain is pervasive  Cross Cutting  Related with Financial Domain  Related with almost every Domain…  We concentrated our work on the Gregorian Calendar
  • 3. Gregorian Calendar  Main Design Challenges  Irregularity  Months have 28,29, 30 or 31 days  Leap years  Associated with natural events (i.e. day/nigth, seasons, earth movement, etc.)  Comparing  January < July  January first < February twentyninth  3 months < 1 year or 5 days < 1 week  Distance  (January distanceTo: July) = (January, 2005 distanceTo: July, 2005)  Time line filtering  workingDays includes: (January first, 2005)  workingDays from: (April first, 2005) to: (April thirty, 2005)  14 days from: (April first, 2005) counting: workingDays
  • 4. Current Models’ Limitations  Lack of abstractions  Smalltalk-80: #Monday < #Friday (It returns false)  Abstractions not matching reality  Squeak: Date dates (There are no days in a date time…)  Some models have one, or a few, general purpose abstractions  aCalendar.set ( Calendar.MONTH, 1) (Does this mean January?)  Calendar.getInstance () (Are calendar a singleton?)  These problems show lack of understanding, they provide a poor domain language, therefore:  It is difficult to express common situations with them  They are difficult to learn  They offer different possible interpretations  These problems imply:  Ad-hoc implementations  Code duplication  Error prone situations
  • 5. Matching Reality RRMM April first 01/01/2005 April 2005 01/01/2005 ? ? Smalltalk-80 RRMM April first 01/01/2005 April 2005 Java / .Net aCalendar RRMM 01/01/2005 April 2005 01/01/2005 Squeak April 2005 RRMM April first 01/01/2005 April 2005 01/01/2005 The Best Solution April first April 2005
  • 6. Our Metaphor Year 2005 Year 2007 Year 2003Year Granularity Jan. 2005 Dec. 2005 Zoom in July 2005 Month of Year Granularity 15/07/05 00:00:00 15/07/05 23:59:59 Zoom in 15/07/05 12:00:00 Date Time Granularity 01/07/05 31/07/05 Zoom in Date Granularity 15/07/05
  • 8. Year Granularity GregorianYear number: 2005. Y2005 GregorianYear number: 2004. Y2004
  • 9. Month of Year Granularity y2005 april April, 2005 April of: 2005 April2005 AprilY2005
  • 10. Date Granularity April first, 2005 01/04/2005 1April2005
  • 11. Date Granularity 14 days from: (April first, 2005) counting: workingDays aRelDate workingDays 01/04/2005 aTimespan 14 days
  • 12. Date Time Granularity (April first, 2005) atNoon 01/04/2005 12:00:00 aDateTime
  • 13. Recurrent Time Entities  Month FebruaryJanuary April
  • 14. Recurrent Time Entities  Day of Month  January first  December twentyFifth  Day of Week  Monday  Tuesday  Time of Day  TimeOfDay noon  TimeOfDay hours: 10 minutes: 11
  • 15. Time measurements and Their Relevance January distanceTo: February January, 2005 distanceTo: February, 2005 (GregorianYear number: 2000) distanceTo: (GregorianYear number: 2005) 1 month 5 years year month 1 5
  • 16. Measurements  Generic Model  Will be presented at OOPSLA 2005  Examples:  1 year + 6 months  18 months  3 months + 5 days  3 months + 5 days (A “Bag”)  5 days + 3 weeks  26 days  1 day + 1 hour  25 hours  0.10 / 1 year  Yearly Interest Rate of 10 %  40 km / 1 hour  Speed  40 km / 1 hour * 2 hours  80 km
  • 17. Time Units year month centurydecade week day minutehour second millisec. Base Units Derived Units  Gregorian calendar irregularity
  • 18. Intervals anInterval Jan2005 January, 2005 to: November, 2006 by: 2 months Nov2006 2 month
  • 20. Time Line Filtering 14 days from: (April first, 2005) counting: workingDays aRelDate workingDays 01/04/2005 aTimespan 14 days nonWorkDys
  • 21. Conclusions  Object model of the Gregorian calendar  Metaphor: Different resolution points of the time line  Total order between time points  Distance  Move from one point to another  Move between points of different resolution  Representation of time line segments and intervals  Generic Measurement Model to reify Time Measurements  Time line filtering allows Relative points in time  Abstractions for time entities such as a day, a day of a month and months.
  • 22. Future Work  Time zone support  Expand Timespan protocol  New abstractions like Hour, Minute, etc. (not units)  Reify time lines  Allow relative points of any granularity