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
Time::Moment::Adjusters(3) User Contributed Perl Documentation Time::Moment::Adjusters(3)

Time::Moment::Adjusters - Adjusters for Time::Moment

    $adjuster = NextDayOfWeek($day);
    $adjuster = NextOrSameDayOfWeek($day);
    
    $adjuster = PreviousDayOfWeek($day);
    $adjuster = PreviousOrSameDayOfWeek($day);
    
    $adjuster = FirstDayOfWeekInMonth($day);
    $adjuster = LastDayOfWeekInMonth($day);
    
    $adjuster = NthDayOfWeekInMonth($ordinal, $day);
    
    $adjuster = WesternEasterSunday();
    $adjuster = OrthodoxEasterSunday();
    
    $adjuster = NearestMinuteInterval($interval);

"Time::Moment::Adjusters" provides adjusters. An adjuster is a CODE reference invoked with an instance of Time::Moment and is expected to return an instance of Time::Moment.

    $adjuster = NextDayOfWeek($day);

The $adjuster adjusts the date to the next occurrence of the given day of the week [1=Monday, 7=Sunday] that is after the date.

    $adjuster = NextOrSameDayOfWeek($day);

The $adjuster adjusts the date to the next occurrence of the given day of the week [1=Monday, 7=Sunday]. If the date already falls on the given day of the week it's unaltered.

    $adjuster = PreviousDayOfWeek($day);

The $adjuster adjusts the date to the previous occurrence of the given day of the week [1=Monday, 7=Sunday] that is before the date.

    $adjuster = PreviousOrSameDayOfWeek($day);

The $adjuster adjusts the date to the previous occurrence of the given day of the week [1=Monday, 7=Sunday]. If the date already falls on the given day of the week it's unaltered.

    $adjuster = FirstDayOfWeekInMonth($day);

The $adjuster adjusts the date to the first occurrence of the given day of the week [1=Monday, 7=Sunday] within the month.

    $adjuster = LastDayOfWeekInMonth($day);

The $adjuster adjusts the date to the last occurrence of the given day of the week [1=Monday, 7=Sunday] within the month.

    $adjuster = NthDayOfWeekInMonth($ordinal, $day);

The $adjuster adjusts the date to the given ordinal day of the week within the month.

Parameters:

ordinal
The ordinal of the week within the month [-4, -1] ∪ [1, 4].
day
The day of the week [1=Monday, 7=Sunday].

    $adjuster = WesternEasterSunday();

The $adjuster adjusts the date to the Western Easter Sunday. The Western computus is based on the Gregorian calendar.

    $adjuster = OrthodoxEasterSunday();

The $adjuster adjusts the date to the Orthodox Easter Sunday. The Orthodox computus is based on the Julian calendar with the Julian date converted to the equivalent Gregorian date.

    $adjuster = NearestMinuteInterval($interval);

The $adjuster adjusts the time of day to the nearest minute of the given minute interval [1, 1440].

Given an minute interval of 30:

    T10:14:59 => T10:00:00
    T10:15:00 => T10:30:00
    T10:29:59 => T10:30:00
    T23:55:00 => T00:00:00 (midnight of the following day)

None by default. All functions can be exported using the ":all" tag or individually.

Christian Hansen "chansen@cpan.org"

Copyright 2015-2017 by Christian Hansen.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2017-04-10 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.