# transpose

URL: https://caijiao.org/date-fns/generic/transpose
Source: docs/date-fns/generic/transpose.md
Description: 将日期对象的时间部分从一天的开始移动到另一天的开始。

将日期对象的时间部分从一天的开始移动到另一天的开始。

```javascript
import { transpose } from "date-fns";

// 示例日期对象
const date = new Date(2024, 4, 15, 10, 30, 0); // 2024年5月15日，上午10点30分

// 将日期对象的时间部分移动到当天的开始
const transposedDate = transpose(date);

console.log("移动时间部分到当天开始后的日期对象：", transposedDate);
// 移动时间部分到当天开始后的日期对象：Wed May 15 2024 00:00:00 GMT+0800
```
