#month()

DESCRIPTION
    returns the current month (1-12)

    or:

    returns the month (1-12) of the given datevalue
SYNOPSIS
    #month()
    #month(d)
ARGUMENTS
    none

    or:

    d - a datevalue, or datevalue expression
EXAMPLES
# pikt +C 'output $text(#month())'
6

# pikt +C 'output $text(#month(#today()))'
6
	rule
		if #month() == 1 && #day() == 1
                        exec wait "=rollover"
                fi
january         ( #month() ==  1 )
february        ( #month() ==  2 )
march           ( #month() ==  3 )
april           ( #month() ==  4 )
may             ( #month() ==  5 )
june            ( #month() ==  6 )
july            ( #month() ==  7 )
august          ( #month() ==  8 )
september       ( #month() ==  9 )
october         ( #month() == 10 )
november        ( #month() == 11 )
december        ( #month() == 12 )
set_datestamp   // set $datestamp = "991215", for example
                set $datestamp = $right($text(#year()),2) .
                                        $if(#month()<10, "0", "") . $text(#month()) .
                                        $if(#day()<10, "0", "") . $text(#day())
SEE ALSO
    #monthnumber()
    #day()
    #daynumber()
    #weekday()
    #year()
    #yearday()
    #yearweek()
    $dayname()
    $monthname()

    Numerical Functions
    String Functions
 
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2019-01-12.   This site is PIKT® powered.
Copyright © 1998-2019 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
script change
script macro