文档中的步骤
结构步骤(非实际执行时序)
marqdo
时刻是 map {unix, zone, iso}。用 地址 拆 HTTPS URL 与查询串。
access(`epoch`, "iso")access(`u`, "host")access(`u`, "query")| 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 |
| 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 |
结构步骤(非实际执行时序)
---
markup: occlusion
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](access(`epoch`, "iso"))
**u = > 址.解析 内容="https://example.com/path?q=1"**
> print text=[host](access(`u`, "host"))
> print text=[query](access(`u`, "query"))