Non FFI version of purescript-datetime

Đang mở
#79 6 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
24/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Lĩnh vực
backend

Hướng nghiên cứu

The issue proposes replacing JavaScript FFI date handling with a fully pure PureScript implementation and points to the existing createDate snippet, the ECMAScript Date specification, and Haskell's Data.Time as references. Start by reading the current date implementation and the linked specification to determine the scope and behavior to reproduce. Done would mean agreeing on and implementing a complete pure replacement; the issue does not identify tests or a narrower target.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

type: enhancement

After a brief chat with @garyb here, it was mentioned that ideally purescript-datetime could actually be 100% pure Purescript.

Would the idea be to reproduce these specs here?

As a starting point I assume I'd need to replace:

var createDate = function (y, m, d) {
  var date = new Date(Date.UTC(y, m, d));
  if (y >= 0 && y < 100) {
    date.setUTCFullYear(y);
  }
  return date;
};

So there would be no leaning on the use of JS's implementation?
This is assuming I'm not barking up the wrong tree, if that is the case what might one need to look at?

edit: I'm also looking at Haskell's Date.Time for guidance.

Ngôn ngữ chính
PureScript
Star
51
Fork
48
Merge trung bình
2 ngày 23 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của purescript/purescript-datetime

Tất cả issue của purescript/purescript-datetime

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.