repl.txt (1193B)
1 2 {{alias}}( [month[, year]] ) 3 Returns the number of days in a month. 4 5 By default, the function returns the number of days in the current month 6 of the current year (according to local time). To determine the number of 7 days for a particular month and year, provide `month` and `year` arguments. 8 9 A `month` may be either a month's integer value, three letter abbreviation, 10 or full name (case insensitive). 11 12 The function's return value is a generalization and does **not** take into 13 account inaccuracies due to daylight savings conventions, crossing 14 timezones, or other complications with time and dates. 15 16 Parameters 17 ---------- 18 month: string|integer|Date (optional) 19 Month (or `Date`). 20 21 year: integer (optional) 22 Year. 23 24 Returns 25 ------- 26 out: integer 27 Days in a month. 28 29 Examples 30 -------- 31 > var num = {{alias}}() 32 <number> 33 > num = {{alias}}( 2 ) 34 <number> 35 > num = {{alias}}( 2, 2016 ) 36 29 37 > num = {{alias}}( 2, 2017 ) 38 28 39 40 // Other ways to supply month: 41 > num = {{alias}}( 'feb', 2016 ) 42 29 43 > num = {{alias}}( 'february', 2016 ) 44 29 45 46 See Also 47 -------- 48