---
description: "date date 日期时间处理函数：提供日期时间处理函数"
category: date-locale-event
keywords: ["date", "getChineseDate", "getCurrentUpYear", "getDateStringPrecisionUnit", "getDoubleWeekBoundary", "getHalYearByYear", "getLocaleDate", "getLocaleDateAndTime", "getLocaleDateString", "getLocaleDateTime", "getSeasonDateByYear", "getServerDate", "getServerDateAndTime", "getServerDateString", "getServerDateTime", "getUserOffsetName", "getWeekBoundary", "getWeekOfYear", "getWindowDateShowFormat，getWindowDateTimeShowFormat，getCustomFormatByWindow，getCustomFormatDateByWindow", "isStrDateContainHMS", "isStrDateContainUTC", "isZeroClock", "日期时间处理函数", "日期", "时间", "多语言", "事件", "主题", "页面标题"]
source: "https://www.e-cology.com.cn/utils/date/freepass"
---

# date date 日期时间处理函数

## 适用场景

提供日期时间处理函数

## 检索符号

- `date`
- `getChineseDate`
- `getCurrentUpYear`
- `getDateStringPrecisionUnit`
- `getDoubleWeekBoundary`
- `getHalYearByYear`
- `getLocaleDate`
- `getLocaleDateAndTime`
- `getLocaleDateString`
- `getLocaleDateTime`
- `getSeasonDateByYear`
- `getServerDate`
- `getServerDateAndTime`
- `getServerDateString`
- `getServerDateTime`
- `getUserOffsetName`
- `getWeekBoundary`
- `getWeekOfYear`
- `getWindowDateShowFormat，getWindowDateTimeShowFormat，getCustomFormatByWindow，getCustomFormatDateByWindow`
- `isStrDateContainHMS`
- `isStrDateContainUTC`
- `isZeroClock`

## 代表示例

```js
import { getLocaleDate } from '@weapp/utils';

console.log(getLocaleDate(new Date(), 'string'));
console.log(getLocaleDate(new Date(), 'timestamp'));
console.log(getLocaleDate(new Date(), 'Date'));
```

## 深入阅读
- [在线免登文档](https://www.e-cology.com.cn/utils/date/freepass)

> 本卡用于快速选型。参数、返回值、限制和完整示例以原始文档为准。
