magic-api magic-api
首页
  • 快速入门
  • 基础教程
  • 权限配置
  • 高级应用
  • 开发插件
  • 模块
  • 函数
  • 扩展
  • Gitee (opens new window)
  • Github (opens new window)
  • 演示 (opens new window)
  • SpringBoot配置
  • 编辑器配置
  • 2.x更新日志
  • 1.x更新日志
  • 0.x更新日志
常见问题
💖支持
交流群
首页
  • 快速入门
  • 基础教程
  • 权限配置
  • 高级应用
  • 开发插件
  • 模块
  • 函数
  • 扩展
  • Gitee (opens new window)
  • Github (opens new window)
  • 演示 (opens new window)
  • SpringBoot配置
  • 编辑器配置
  • 2.x更新日志
  • 1.x更新日志
  • 0.x更新日志
常见问题
💖支持
交流群
  • 模块

    • db模块
    • http模块
    • log模块
    • request模块
    • response模块
    • env模块
    • magic模块
  • 函数

    • 聚合函数
    • 日期函数
      • 字符串函数
      • 数组函数
      • 数学函数
      • 其它函数
    • 扩展

      • Object
      • Number
      • 数组&集合
      • Date
      • Class
      • Pattern
    • API
    • 函数
    mxd
    2022-01-30
    目录

    日期函数

    # date_format

    • 入参:target:Date 日期
    • 入参:pattern:String 格式
    • 返回值:Number
    • 函数说明:日期格式化
    return date_format(new Date());  // 2020-01-01 20:30:30
    // return date_format(new Date(),'yyyy-MM-dd');  // 2020-01-01
    

    # now

    • 返回值:Date
    • 函数说明:返回当前日期
    return now(); // 等同于 new Date();
    

    # current_timestamp_millis

    • 返回值:long
    • 函数说明: 取当前时间戳(毫秒)
    return current_timestamp_millis(); // 等同于 System.currentTimeMillis();
    

    # current_timestamp

    • 返回值:long
    • 函数说明: 取当前时间戳(秒)
    return current_timestamp(); // 等同于 current_timestamp_millis() / 1000;
    
    上次更新: 2025-05-03 23:57:14
    聚合函数
    字符串函数

    ← 聚合函数 字符串函数→

    Theme by Vdoing | Copyright © 2020-2025 ssssssss.org | MIT License
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式
    ×