Boost logo

Boost :

Subject: Re: [boost] proposal for date implementation
From: Shamsher Siddiqui (mail.shamshersiddiqui_at_[hidden])
Date: 2013-04-24 21:10:17


>
> thnx for reviewing my project
>
>
 Would you start from the H.H implementation, mine or would start from a
white page.?
  i will start with HH implementation

What do you think of date iterators?
date iterator should be random access iterators since user can either do
increment ,decrement ,
cheaks for equality ,ineaquality all these can be done after making date
iterator as random

What about I/O?
date are streamable and
strftime() and strptime() can be used to format the date
*strftime*() function formats break the date into formats and stores the
result in character array while *strptime*() process the input string from
left to right .whitespace, literal, or format are handled one by one by one
but it stops processing when it doesn't match the format string .

strptime("1991-01-12 18:31:01", "%Y-%m-%d %H:%M:%S", &tm);

What are the functions a class date or a model of a concept Date must
provide?
class date should have following features or function ;
1)compares 2 dates and returning integral values
2)checks for equality.
3)add,subtract 2 dates
4)input and setting of long date format(dd,mm,yy, hh,min,sec)
5)to initialize the date with another copy of date object (creating
duplicates)
6)prior and post date check
7)implementation of constructor to initialize the date with string ,full
date form

It would be great if you mark the features as MUST, SHOULD, and COULD in
order to make clear the priorities.

> i definitely do it as u told .and rearrange my project according to
>> must should and could.
>
>
No invalid dates can be entered considering range checking ,non
existent date if entered bad_date exception is thrown
yes i want to check the date is valid or not .and if not bad_date exception
is thrown
it will increase the time consume but always yield correct result.

> .
>>
> Constructing bi-directional conversion of serial and field by making use
> of static cache to optimize conversion
>
     Do you mean that you pretend to memoize the conversions?
     yes , i meant the same.

i have one question ?
Your proposal is more a list of functionalities than a clear design.

> it means that i have to add description about my proposal rather
> functionalites.

and i will work on Gregorian calendar interface and functionalities mail u
soon .

Thank You.
 Shamsher Ahmed

>
>
> ______________________________**_________________
> Unsubscribe & other changes: http://lists.boost.org/**
> mailman/listinfo.cgi/boost<http://lists.boost.org/mailman/listinfo.cgi/boost>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk