[Kde-bindings] KDatePicker question
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Mon Oct 11 21:02:57 UTC 2004
On Monday 11 October 2004 14:58, Richard Dale wrote:
> On Monday 11 October 2004 13:31, Thibauld Favre wrote:
> > Hi,
> >
> > I was wondering wether it was normal that the
> > KDE::DatePicker.date method returns a Qt::Date and not a "ruby" Date
> > object. Is it possible to have KDE::DatePicker.date return a ruby Date
> > object ? Sorry if this is a stupid question but as I don't have the
> > answer, I felt like asking...
>
> That would be possible. For instance, the QtJava bindings return a Java
> Calendar instance instead of a QDate. But I'd been thinking of changing
> that to a QDate, because the java Calendar class is very badly designed. I
> haven't looked into how the ruby date class compares with QDate.
I've read the ruby docs and both Date and Time sound really good. For
instance, I especially liked this bit:
"The Date class allows you to determine whether to implement the cutover (to
the Gregorian calendar) in 1582 (the Date::ITALY option), 1752
(Date::ENGLAND), or another date of your choosing.".
Absolutely essential that :)
The Ruby Time class is based on the number of days since 1970, so it is a thin
wrapper to the Unix date - the same as QTime.
On the other hand there's no equivalent to QDateTime, so that would have to
stay as it is, which might be a bit ugly.
-- Richard
More information about the Kde-bindings
mailing list