|
Boost : |
Subject: [boost] proposal for date_time implementation
From: Shamsher Siddiqui (mail.shamshersiddiqui_at_[hidden])
Date: 2013-04-23 14:48:34
hi mentors plz review my project and give me suggestion to improve to
my proposal
Name :Shamsher Ahmed
College/University:University Insititute of Engineering
&Technology,Chandigarh,India
Course/Major:Computer Science & Engineering
Degree Program:Bachelor of Engineering
Email:mail.shamshersiddiqui_at_[hidden]
Homepage:Not yet
Availability:
How much time do you plan to spend on your GSoC?
I can work full time to complete this project.
What are your intended start and end dates?
I will start the project according to GSOC 2013 schedule but i will
try to finish the project 2 weeks before so that I can have the
necessary time for debugging and for unforeseen situation it occurs.
What other factors affect your availability (exams, courses, moving,
work, etc.) ?
My semester exam will get start from 18 may and it will end on 28
may .So I will have complete time to dedicate. I donât have any course
or work during this summer .
Background Information:
⢠Please summarize your educational background (degrees earned,
courses ,taken, etc.)
I passed out 10+2 from Indian School Certificate in 2010 and I am
currently pursing bachelor of engineering from university institute of
Engineering & Technology, Chandigarh
Till now I mainly focused in learning programming language
(C,C++,Java). I have mastered over Java and c++ but scratchy in C.I
have also taken course on Algebra, Calculus, Data Structure &
Algorithm ,database etc etc.
⢠Please summarize your programming background (OSS projects,
internships,jobs, etc.)
This will be my first OSS project at such large level. I have
developed many things in c++ & Java.
During my last summer I have done my internship in slr infotech ,a
small software firm .
⢠Please tell us a little about your programming interests :
I am programming from 8th grade .In 10 and +2 board exam I obtained 96
and 97 respectively in my computer science subject. I love to code
for hours .And most important thing about open-source I like about is
sharing, helping and hacking code .
⢠Please tell us why you are interested in contributing to the Boost
C++ Libraries?
Boost c++ Libraries are one most powerful libraries of c++ used by
many well known organizations .It is cross platform library which has
high efficiency And it goes together with standard template library in
c++. I will get support from boost community and it is documented very
well which makes it very easy to understand and if any bugs comes than
it is easily recognized and eliminated , lastly while working with
bright minds I will be able to learn from them and impart my
experience , knowledge to other developers
⢠What is your interest in the project you are proposing?
Libraries were mystery for me when I started learning my first
programming language c but after some time I was able to perform the
same task without using library but there was increase in time and
length of code for doing the same program.I want to develop this
project because it will increase the reusability of code and in Boost
community best minds works together to give the one of the best
libraries of c++.
Date library will be always used in every development project
whether big or small and When I read this project
https://svn.boost.org/svn/boost/sandbox/chr
ono_date/libs/date/doc/date.html .This is small library but will be
most efficient and will be able to perform all task and save time
,reusability of code is very high.
⢠Have you done any previous work in this area before or on similar projects?
No ,I havenât done any project regarding libraries but I am using
libraries in my other project.
But me and my friend are developing a tagging software which creates
a folder on the basis of album,artist,track number etc. We have
implemented internal structure but GUI part is left which my friend
is working on. and developed small games in c++ as my project
assignment.
⢠What are your plans beyond this Summer of Code time frame for your
proposed work?
After Summer of code ,I will remain involve with the boost c++
community and I would like to add more feature to current
project.Secondly I will work with the boost community in building in
their library because I love coding for long hour. I enjoy this work.
⢠Please rate, from 0 to 5 (0 being no experience, 5 being expert),
your knowledge of the following languages, technologies, or tools:
ï§ C++: 4
ï§ C++ Standard Library: 3
ï§ Boost C++ Libraries: 2
ï§ Subversion :2
⢠What software development environments are you most familiar with
(Visual Studio, Eclipse, KDevelop, etc.)
I generally use Qt creater or Visual studio depending on the
operating system I am using .
⢠What software documentation tool are you most familiar with
(Doxygen, DocBook, Quickbook, etc.)?
I am familiar with Doxygen
Project Proposal
Goals & Implemenatations
1) Construction of Date:
⢠Date can be represented in two ways field representation or as an
serial representation . In field based representation(YMD) date value
is constructed from individual year,month,and day value in three
integral value. In serial reprensentation(SERIAL) data values are
stroed in intergral number of days from an implementation defiend
epoch date, there is third hybrid version to represent the date
which implemantd the both representation and it is named
HH_YMD_SERIAL_X where x represents the size of types in byte.
⢠Providing support for entering the date in form YDM(year,day,month)
which is lacking currently in chrono:date library
⢠No invalid dates can be entered considering range cheaking ,non
existent date if entered bad_date exception is thrown .
⢠Constructing constant object for day,week_day.
Eg. last/may/2000 represents 31 may 2000
⢠Construction of meta data for date
1) Leap year flag
2) Nth day of month
3) Nth weekday month
2) Arithematic Operation On date
Date airthematic can be done on three units i.e
day,month,year.In chrono date ::calendar(Gregorian calendar) length
of month and year is not fixed :
⢠day arithematic
1) Adding number of days to date until range doesnât exceed
2) Implementing last day arithmetic to avoid the bad date excepti
Eg.
aug/last/2011 +months(1)= sep/30/2011
aug/31/2000
+months(1)=sep/31/2000 //invalid date bad date excep thrown
⢠month arithmetic
Month arithmetic is quite complex
compared to day arithmetic since number of are
not fixed .
1) (month day <=28 || month day =last day ) always add month
2) month day =29 cheak for leap year and than add month
3) Month day>=30 add but donât add if resulting month is feb
4) Using constant objects for month arithmetic.
⢠year arithematic
1) Always add year to date considering the condition of leap year
2) Reversal of date back to original date
3) Usage of last day during year arithematic
During any of the airthematic operation result should not be an
invalid date if it occurs than bad_date exception is thrown.
3) InterConversion field representation & serial representation
Some operation are quite fast on field but airthematic
operation are much faster on serial campared field representation .So
it is necessary to provide the inter-coversion so that it can be
easily converted from one representation to another.
1) Constructing bi-directional conversion of serial and field by making use
of static cache to optimize conversion
4) Building function for week days & date formatting
1) weekday of a date used.
2) nextweek day of date used.
3) previous weekday of date used.
4) finding number of weeks in month
5) formatting of date according of all types
5)Interoperability with other calendar
Current chrono::calendar is Gregorian calendar which exist
everywhere in date & time library of every programming
language.(c,c++,java) and ISO 8601 and POSIX. This section provides
conversion of chrono calendar to client calendar.
1) Conversion of chrono ::calendar to Julian Calendar
2) Conversion of chrono :: calendar to Hebrew calendar
3) Conversion of chrono :: calendar to hindu calendar
4) Conversion of chrono :: calendar to Chinese calendar
5) Conversion of chrono :: calendar to Buddhist calendar
6) Conversion of chrono :: calendar to Islamic calendar
Hindu ,Chinese ,Buddhist ,Hebrew(Jewish ) calendars are lunisolar
calendar with a very little difference.
Julian, Gregorian are very much similar except the method of finding
the leap year.
Islamic calendar is lunar calendar(totally dependent on moon ) which
is quite unpredicatable. Hence accurate conversion is rare.
TimeLine
Until 17 June :Community bonding , understanding boost c++ libraries
,discussing with mentor about the details of proposal .
17 June to 27 June: Construction of date
28 June to 12 july : testing &debugging of construction of date and
implementing date arithemetic
13 july to 29 july (Mid term evaluation) : implementation of
interconversion of serial and field representation and testing
,debugging and making more efficient the previous code develop.
30 july to 15 August :Implementation of date formatting and
developing function on weekday.
16 August to 30 August: testing ,debugging and aadding more feature
to weekday and implementation of interconversion of calendar.
31 August to 23 Sept:testing ,debugging ,making efficient the whole code .
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk