$ampm()

DESCRIPTION
        returns "AM" if the current or given time falls between midnight and twelve noon\,
        else "PM" if between noon and midnight
SYNOPSIS
    $ampm()

    or:

    $ampm(d)
ARGUMENTS
    none, for the current time

    or:

    d - a datevalue, or datevalue expression
EXAMPLES
# date
Tue Jun 11 22:35:16 CDT 2007
# pikt +C 'output $ampm()'
PM
# pikt +C 'output $ampm(#now())'
PM
        rule
                if $ampm() eq "PM"
                        =hourly(output mail $inlin, )
                else
                        =every_two_hours(output mail $inlin, )
                fi
        rule
                output syslog "current time is $text(#hour()):$text(#minute()):
                                               $text(#second()) $ampm()"
SEE ALSO
    String Functions
    Numerical 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
data input
macros