#weekday()

DESCRIPTION
    returns the current weekday (1-7)

    or:

    returns the weekday (1-7) of the given datevalue
SYNOPSIS
    #weekday()

    or:

    #weekday(d)
ARGUMENTS
    none

    or:

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

# pikt +C 'output $text(#weekday(#today()))'
4
	begin
                if #weekday() == 1 || #weekday() == 7
                        quit
                fi
sunday          ( #weekday() == 1 )
monday          ( #weekday() == 2 )
tuesday         ( #weekday() == 3 )
wednesday       ( #weekday() == 4 )
thursday        ( #weekday() == 5 )
friday          ( #weekday() == 6 )
saturday        ( #weekday() == 7 )
	begin
                if =sunday || =saturday
                        quit
                fi
bypass_server_reboots
                if $host =~ "$servers"
                        if =server_reboot_period(#weekday(), #hour())
                                next
                        fi
                fi
SEE ALSO
    #day()
    #daynumber()
    #month()
    #monthnumber()
    #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
search links
Pikt script