Exemplo n.º 1
0
        // period_command
        public static Value PeriodCommand(CallScope args)
        {
            string arg = CallScope.JoinArgs(args);

            if (String.IsNullOrEmpty(arg))
            {
                throw new LogicError(LogicError.ErrorMessageUsagePeriodText);
            }

            Report        report = args.FindScope <Report>();
            StringBuilder sb     = new StringBuilder();

            sb.AppendLine(TimesCommon.Current.ShowPeriodTokens(arg));

            DateInterval interval = new DateInterval(arg);

            sb.AppendLine(interval.Dump());

            report.OutputStream.Write(sb.ToString());
            return(Value.Empty);
        }