14-日期时间地址ok
Structure
import日时:lib/日期时间.mq.md址:lib/地址.mq.md
fn · h1无需插件的时间与地址
comment
fn · h1main
bind
`epoch` = > 日时.自戳 秒=0 区=Asia/Shanghaicall
> print text=[iso](`epoch`)bind
`u` = > 址.解析 内容=https://example.com/path?q=1call
> print text=[host](`u`)call
> print text=[query](`u`)Functions
Variables
-
epoch map · 3
unix 0 zone +08:00 iso 1970-01-01T08:00:00+08:00 key value unix 0 zone +08:00 iso 1970-01-01T08:00:00+08:00 -
u map · 7
scheme https userinfo host example.com port None path /path query q=1 … key value scheme https userinfo host example.com port None path /path query q=1 fragment
Execution
1970-01-01T08:00:00+08:00
example.com
q=1
Source
---
title: 中层标准库 — 日期时间与地址
description: 日历时刻 + URL/查询串(Mid2 M7)
导入 日时:lib/日期时间.mq.md
导入 址:lib/地址.mq.md
---
# 无需插件的时间与地址
时刻是 map `{unix, zone, iso}`。用 `地址` 拆 HTTPS URL 与查询串。
# main
**epoch = > 日时.自戳 秒=0 区="Asia/Shanghai"**
> print text=[iso](`epoch`)
**u = > 址.解析 内容="https://example.com/path?q=1"**
> print text=[host](`u`)
> print text=[query](`u`)
时刻是 map
{unix, zone, iso}。用地址拆 HTTPS URL 与查询串。