marqdo

14-日期时间地址ok

features/14-日期时间地址.mq.md

Structure

import日时:lib/日期时间.mq.md址:lib/地址.mq.md
fn · h1无需插件的时间与地址
comment

时刻是 map {unix, zone, iso}。用 地址 拆 HTTPS URL 与查询串。

fn · h1main
bind `epoch` = > 日时.自戳 秒=0 区=Asia/Shanghai
call> print text=[iso](`epoch`)
bind `u` = > 址.解析 内容=https://example.com/path?q=1
call> print text=[host](`u`)
call> print text=[query](`u`)
Functions
Variables
  • epoch map · 3
    unix0
    zone+08:00
    iso1970-01-01T08:00:00+08:00
  • u map · 7
    schemehttps
    userinfo
    hostexample.com
    portNone
    path/path
    queryq=1

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`)

Variable