| 209 | { |
| 210 | QiFunc_time_yd() : QiFunc(0, 1) {} |
| 211 | QiVar exec(const std::vector<QiVar>& args, QiScriptInterpreter*) const override |
| 212 | { |
| 213 | time_t s = args.empty() ? time(nullptr) : static_cast<time_t>(args[0].toInteger()); |
| 214 | tm m; |
| 215 | localtime_s(&m, &s); |
| 216 | return m.tm_yday; |
| 217 | } |
| 218 | }; |
| 219 | /* |
| 220 | int timestamp: sec |