| 193 | { |
| 194 | QiFunc_time_y() : QiFunc(0, 1) {} |
| 195 | QiVar exec(const std::vector<QiVar>& args, QiScriptInterpreter*) const override |
| 196 | { |
| 197 | time_t s = args.empty() ? time(nullptr) : static_cast<time_t>(args[0].toInteger()); |
| 198 | tm m; |
| 199 | localtime_s(&m, &s); |
| 200 | return m.tm_year + 1900; |
| 201 | } |
| 202 | }; |
| 203 | /* |
| 204 | int timestamp: sec |