>> This patch was made by Sumanth Krishna Mannam.
>> Please refer following message ~ and attached patch.
>> =======================================================
>> > first i was strolling along, reading elm_datetime.c... and then i saw:
>> > 
>> > static int _days_in_month[12] = { 31, 28, 31, 30, 31, 30,
>> > 31, 31, 30, 31, 30, 31 };
>> > 
>> > and then i was like:
>> > http://www.youtube.com/watch?v=6FWUjJF1ai0
>> >
>> > and i saw...
>> > if (__isleap(*timearr[ELM_DATETIME_YEAR]) &&
>> > 
>> > and i was like:
>> > http://www.youtube.com/watch?v=fM1O9jWeNoI
>> > 
>> > (look at clock module src of e17 (in svn trunk/e/src/modules/clock) - in
>> > there it manages to draw months and handle month sizes by using syscalls
>> > that should get this from a time database and thus be correct. you can
>> > figure out the range by using syscalls to do it all look @ _time_eval()).
>> I felt array based count is not that bad... and even elm_calendar does the
>> same . anyway, I gave a try with your method, using mktime() and check for
>> month wraaping and then deciding. Patch is updated accordingly . 
> 
> http://www.corkscrew-balloon.com/travel/9812paris/leap.html
> 
> leap years do not make feb have 29 days EVERY 4 year. there are oddities to
> this over history and probably will be in the future too. thats the pont of 
> the
> system time "database" and "apis" to figure out so you dont have to :)
> 
>> > limits for years.. why 1970->2037? that seems a bit silly to limit it -
>> > what if i'm entering the date of birth of my father? it's definitely before
>> > 1970 :)
>> I made 1970 as the default limit based on Epoc time 1970.
>> I have no issues to make default limit to further lowest :) I changed the
>> limits to 1900 & 2037. 
> 
> why not just allow ANY date ... no limits? what if someone uses the widget for
> a historcal event "Examination app" that asks students when events happened in
> history...
> 

The default limits for the year are used for displaying the possible values on 
modules plug-ins like ctx_popup/disk selector list and spinner module.
More over, it's default limit and applications can override the limit with 
provided APIs ( value_min/max set ), based on their need. 
Example, any app accepting historical years, can set the min limit back to 1800 
or even less. No restrictions.

>> > and then i was looking at api:
>> > 
>> > Elm_Datetime_FieldType -> Elm_Datetime_Field_Type
>> > 
>> > otherwise i shall not quibble about api :)
>> Yep...renamed to Elm_Datetime_Field_Type.
> 
> cool - fix the above limit. it dont like it. for at least 1 reason given 
> above.
> other than that take note of that page on leap years and just do some research
> yourself about time and how humans have, over history, defined it, written it
> down, played with it, adjusted it and tried to make your time system match the
> natural world around us. it'll encourage you to just piggy-back on someone
> elses time api so you dont have to re-do all the work.. and if there is a bug 
> -
> its fixed in 1 place for everyone.
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to