[RFC]: Time Series Generation Module
- 主要语言
- JavaScript
- 星标
- 6k
- 派生
- 1.3k
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 611
描述
### Description
This RFC proposes the addition of a Time Series Generation module to `@stdlib/time` module. This module will facilitate the creation of sequences of dates or timestamps based on various patterns or intervals, catering to the needs of applications requiring regularly spaced time data.
The Time Series Generation module will offer flexibility in defining intervals, allowing users to specify common patterns such as daily, weekly, monthly, quarterly, or yearly intervals. Additionally, users will have the option to define custom intervals with arbitrary durations to suit specific requirements.
Key features of the Time Series Generation module include support for specifying start and end dates for the time series, handling of leap years.
This module aims to provide a convenient and efficient solution for generating time series data, enabling users to perform tasks such as financial analysis, data visualization, and scheduling with ease and accuracy.
Example for how this function can be called
```js
const { generateTimeSeries } = require('@stdlib/time');
const startDate = new Date('2024-01-01');
const endDate = new Date('2024-12-31');
const customSeries = generateTimeSeries({
interval: {
unit: 'month',
value: 3 // every 3 months
},
start: startDate,
end: endDate,
format: 'YYYY-MM-DD'
});
console.log(customSeries);
/*
[
'2024-01-01',
'2024-04-01',
'2024-07-01',
'2024-10-01'
]
*/
```
If this feature request gets the green light, I'd be happy trying implementing it.
### Related Issues
N/A
### Questions
No.
### Other
No.
### Checklist
- [X] I have read and understood the [Code of Conduct](https://github.com/stdlib-js/stdlib/blob/develop/CODE_OF_CONDUCT.md).
- [X] Searched for existing issues and pull requests.
- [X] The issue name begins with `RFC:`.
贡献指南
调研方向
Start by reviewing the existing @stdlib/time module and its conventions for date and timestamp utilities. Define the interval, range, leap-year, custom-duration, and formatting requirements before implementation; done means a usable time-series generator covering the examples and stated behaviors.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- data
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100