GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Prima::Calendar(3) User Contributed Perl Documentation Prima::Calendar(3)

Prima::Calendar - standard calendar widget

        use Prima qw(Calendar Application);
        my $cal = Prima::Calendar-> create(
                useLocale => 1,
                size      => [ 150, 150 ],
                onChange  => sub {
                        print $_[0]-> date_as_string, "\n";
                },
        );
        $cal-> date_from_time( localtime );
        $cal-> month( 5);
        run Prima;

Provides interactive selection of date between 1900 and 2099 years. The main property, date, is a three-integer array, day, month, and year, in the format of perl localtime ( see "localtime" in perlfunc ) - day can be in range from 1 to 31,month from 0 to 11, year from 0 to 199.

Change
Called when the date property is changed.

date DAY, MONTH, YEAR
Accepts three integers in format of "localtime". DAY can be from 1 to 31, MONTH from 0 to 11, YEAR from 0 to 199.

Default value: today's date.

day INTEGER
Selects the day in month.
firstDayOfWeek INTEGER
Selects the first day of week, an integer between 0 and 6, where 0 is Sunday is the first day, 1 is Monday etc.

Default value: 0

month
Selects the month.
useLocale BOOLEAN
If 1, the locale-specific names of months and days of week are used. These are read by calling "POSIX::strftime". If invocation of POSIX module fails, the property is automatically assigned to 0.

If 0, the English names of months and days of week are used.

Default value: 1

See also: date_as_string

year
Selects the year.

can_use_locale
Returns boolean value, whether the locale information can be retrieved by calling "strftime".
month2str MONTH
Returns MONTH name according to useLocale value.
make_months
Returns array of 12 month names according to useLocale value.
day_of_week DAY, MONTH, YEAR, [ USE_FIRST_DAY_OF_WEEK = 1 ]
Returns integer value, from 0 to 6, of the day of week on DAY, MONTH, YEAR date. If boolean USE_FIRST_DAY_OF_WEEK is set, the value of "firstDayOfWeek" property is taken into the account, so 0 is a Sunday shifted forward by "firstDayOfWeek" days.

The switch from Julian to Gregorian calendar is ignored.

date_as_string [ DAY, MONTH, YEAR ]
Returns string representation of date on DAY, MONTH, YEAR according to useLocale property value.
date_from_time SEC, MIN, HOUR, M_DAY, MONTH, YEAR, ...
Copies date from "localtime" or "gmtime" result. This helper method allows the following syntax:

        $calendar-> date_from_time( localtime( time));
    

Dmitry Karasik, <dmitry@karasik.eu.org>.

Prima, Prima::Widget, POSIX, "localtime" in perlfunc, "time" in perlfunc, examples/calendar.pl.
2022-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.