
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FORCE Data Base Compiler - ##############################################################################
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
##############################################################################
###+-------+##################################################################
#+-| DAY() |------------------------------+###################################
#| +-------+ Returns the day of the month |###################################
#+----------------------------------------+###################################
##############################################################################
##############################################################################
#+--| Summary |--------------+################################################
#| #INCLUDE date.hdr |################################################
#+---------------------------+################################################
##############################################################################
##############################################################################
#+--| Syntax |--------------------------------+###############################
#| FUNCTION INT day PROTOTYPE |###############################
#| PARAMETERS VALUE DATE date_value |###############################
#+--------------------------------------------+###############################
##############################################################################
##############################################################################
##############+---| Description |-------------------------------+#############
##############| The day() function returns the day of the month |#############
##############| as represented by date_value. |#############
##############+-------------------------------------------------+#############
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Automatically back up databases on the |#########
#########| * 1st and 15th of the month. |#########
#########| |#########
#########| IF day(today()) = 1 .OR. day(today()) = 15 |#########
#########| DO backup_data |#########
#########| ENDIF |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * In cities where there are water shortages, |#########
#########| * allocation is done by the day. I.e., on ODD |#########
#########| * days, the residents of the north side of a |#########
#########| * city may water their lawns and on EVEN days |#########
#########| * the south side may water. This function |#########
#########| * returns which group may water. |#########
#########| |#########
#########| FUNCTION CHAR which_group |#########
#########| IF day( today() ) % 2 = 0 |#########
#########| RETURN "South" |#########
#########| ENDIF |#########
#########| RETURN "North" |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also: cdow() cmonth() ctod() days_btw_dates() days_from()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson