[Cuis-dev] Timespan of days
Hernán Wilkinson
hernan.wilkinson at 10pines.com
Fri Jul 28 17:18:21 PDT 2023
Hi Hilaire,
I suggest you to use the package Chalten. It is in the calendar repo or
something like that
Look at the test for examples.
I wrote a paper that explains how it works.
For example, you can evaluate:
July/28/2023 distanceTo: July/30/2023
It will return 2*day and print-it as 2 days
It uses Aconcagua that implements measurements
You can create a measure of time using different units as second, minute,
hour, day, month, year, etc
For example:
2*day
2*day convertTo: hour —> 48*hour
2*hour = (120*minute) —> true
2*hour - (60*minute) = (1*hour) —> true
You will see that it is really simple to use and complete.
If you cannot find the paper, let me know and I’ll send it to you
Cheers
Hernan
On Fri, 28 Jul 2023 at 19:30 Hilaire Fernandes via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:
> Hi folks,
>
> I want to modelise a timespan of days to represent holidays periods.
>
> The Timespan class does not work with Date, but DateAndTime, makes code
> unnecessarily complex and duration is odd:
>
> (Timespan starting: DateAndTime now ending: DateAndTime tomorrow )
> duration days
>
> => 0 (day), I expect 2 days of holidays.
>
> May be Timespan is not the object I should use.
>
> Opinions ?
>
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
--
*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230728/09eb8e0d/attachment.htm>
More information about the Cuis-dev
mailing list