User:Mdu02/sandbox

Task 1
imgs

Task 2
Q1. Which letter is conventionally used in Scribunto modules to hold the table of functions? A1. p

Q2. What keyword marks the start of a function definition? A2. function

Q3. What keyword marks the end of a function definition? A3. end

Task 5
Q1. What does %d+ match in a Lua pattern? A1. Sequence of purely 0-9 digits

Q2. What does %w+ match in a Lua pattern? A2. Sequence of alphanumeric ASCII

For an American-style date, I would look to use the pattern "(%w+) (%d+,) (%d+)" to catch the comma, then use string.sub to remove the trailing character in the day field.

I created function unpackmdydate in the sandbox as a demonstration.