GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Download
  • News
  • Community
  • Resources
  • Language Reference
  • SmallBASIC Manual

This view

  • Original page
  • New address

GeezerVison is showing smallbasic.github.io — SmallBASIC | WEEKDAY

Edit History

WEEKDAY

n = WEEKDAY (dmy | (d,m,y) | julian_date)

Home > Reference > Date

Returns the day of the week as a number between 0 and 6. Sunday is 0. WEEKDAY accepts a string dmy as returned by DATE, a number julian_date as returned by JULIAN or a date given by the three numbers d for day, m for month and y for year.

Example 1

PRINT WeekDay(DATE)                     ' Output: 3  -> Wednesday
PRINT WeekDay(Julian(31, 12, 2023))     ' Output: 0  -> Sunday
PRINT WeekDay(31, 12, 2023)             ' Output: 0  -> Sunday

Example 2

SPLIT "Sun Mon Tue Wed Thu Fri Sat", " ", wd
print "Today is " + wd(WEEKDAY(DATE)) + " " + DATE 
' Output: Today is Wed 13/09/2023
Date
DATE   DATEDMY   DATEFMT   JULIAN   TICKS   TIME   TIMEHMS   TIMER   TIMESTAMP   WEEKDAY  
This page was last edited on Wed, 13 Sep 2023 15:57:51 +0200 | Markdown processed with pandoc 3.1.12.1
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.