UNPKG

wsemi

Version:

A support package for web developer.

39 lines (27 loc) 1.15 kB
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>examples for dayjs</title> <!-- @babel/polyfill已廢棄 --> <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/dayjs@1.11.7/dayjs.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/wsemi@1.7.19/dist/wsemi.umd.js"></script> <script> let log = console.log console.log = function(){ log.apply(null, arguments) wsemi.bodyLog.apply(null, arguments) } </script> </head> <body> <script> console.log("isday('2019-01-01')", wsemi.isday('2019-01-01') ) console.log("isday('2019-21-01')", wsemi.isday('2019-21-01') ) console.log("ismonth('2019-01')", wsemi.ismonth('2019-01') ) console.log("addMonth('2019-01',1)", wsemi.addMonth('2019-01',1) ) console.log("addMonth('2019-01',-1)", wsemi.addMonth('2019-01',-1) ) </script> </body> </html>