#daynumber()

DESCRIPTION
    returns the current weekday as a digit (1-7)

    or:

    returns the weekday as a digit (1-7) for the given string representing a day of the week
    ("Sunday", "Monday", ...; "Sun", "Mon", ...)
SYNOPSIS
    #daynumber()

    or:

    #daynumber(s)
ARGUMENTS
    none

    or:

    s - a string, or string expression, representing a day of the week
        ("Sunday", "Monday", ...; "Sun", "Mon", ...)
EXAMPLES
# pikt +C 'output $text(#daynumber())'
4

# pikt +C 'output $text(#daynumber("Monday"))'
2

# pikt +C 'output $text(#daynumber("Sat"))'
7
        rule    // ignore scheduled reboots
                if =reboot_period(#daynumber(), #hour())
                        next
                fi
        rule    // every $patch has its own #dn value
                set #dn = #daynumber()

        ...

        rule    // report if not found or unsuccessful
                if $state eq "-"
                        if    $state ne %state          // report initial
                           || #dn < %dn                 // repeat weekly
                                output mail "patch $patch not installed!"
                        endif
                endif
SEE ALSO
    #day()
    #month()
    #monthnumber()
    #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
keys.conf
config file