mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-09 22:10:57 +08:00
Initial commit: NOFX AI Trading System
- Multi-AI competition mode (Qwen vs DeepSeek) - Binance Futures integration - AI self-learning mechanism - Professional web dashboard - Complete risk management system
This commit is contained in:
37
web/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.cjs
generated
vendored
Normal file
37
web/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.cjs
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
"use strict";
|
||||
exports.Hour1To24Parser = void 0;
|
||||
var _constants = require("../constants.cjs");
|
||||
var _Parser = require("../Parser.cjs");
|
||||
|
||||
var _utils = require("../utils.cjs");
|
||||
|
||||
class Hour1To24Parser extends _Parser.Parser {
|
||||
priority = 70;
|
||||
|
||||
parse(dateString, token, match) {
|
||||
switch (token) {
|
||||
case "k":
|
||||
return (0, _utils.parseNumericPattern)(
|
||||
_constants.numericPatterns.hour24h,
|
||||
dateString,
|
||||
);
|
||||
case "ko":
|
||||
return match.ordinalNumber(dateString, { unit: "hour" });
|
||||
default:
|
||||
return (0, _utils.parseNDigits)(token.length, dateString);
|
||||
}
|
||||
}
|
||||
|
||||
validate(_date, value) {
|
||||
return value >= 1 && value <= 24;
|
||||
}
|
||||
|
||||
set(date, _flags, value) {
|
||||
const hours = value <= 24 ? value % 24 : value;
|
||||
date.setHours(hours, 0, 0, 0);
|
||||
return date;
|
||||
}
|
||||
|
||||
incompatibleTokens = ["a", "b", "h", "H", "K", "t", "T"];
|
||||
}
|
||||
exports.Hour1To24Parser = Hour1To24Parser;
|
||||
Reference in New Issue
Block a user