DateFunctions.cs 535 B

1234567891011121314151617
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace InABox.Core
  5. {
  6. internal static class DateFunctions
  7. {
  8. public const string GROUP = "Date";
  9. public static void Register()
  10. {
  11. CoreExpression.RegisterFunction("Now", "Returns the current date and time.", GROUP, new string[] {}, (p, vars, c) => DateTime.Now);
  12. CoreExpression.RegisterFunction("Today", "Returns the current date.", GROUP, new string[] {}, (p, vars, c) => DateTime.Today);
  13. }
  14. }
  15. }