(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-eq)} {(1)} {(Id.Lit_RBracket ']')})
              terminator: (Token id:Id.Op_Semi val:';' span_id:23)
            )
          ]
          action: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:ts)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_Backtick val:'`' span_id:29)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(date)} 
                                    {(--reference) (Id.Lit_Equals '=') ($ Id.VSub_Number '$1')} {(Id.Lit_Other '+') (Id.Lit_Other '%') (s)}
                                  )
                                ]
                              )
                          )
                        }
                      spids: [28]
                    )
                  ]
                )
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:45)
                  arg_word: {(1)}
                )
              ]
            )
          ]
          spids: [12 25]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:ts)
              op: assign_op.Equal
              rhs: 
                {
                  (command_sub
                    left_token: (Token id:Id.Left_Backtick val:'`' span_id:53)
                    command_list: 
                      (command.CommandList
                        children: [(C {(date)} {(Id.Lit_Other '+') (Id.Lit_Other '%') (s)})]
                      )
                  )
                }
              spids: [52]
            )
          ]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:now)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: (Token id:Id.Left_Backtick val:'`' span_id:67)
                command_list: 
                  (command.CommandList
                    children: [(C {(date)} {(Id.Lit_Other '+') (Id.Lit_Other '%') (s)})]
                  )
              )
            }
          spids: [66]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:recent)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: (Token id:Id.Left_Backtick val:'`' span_id:78)
                command_list: 
                  (command.CommandList
                    children: [
                      (C {(date)} {(--date) (Id.Lit_Equals '=') (DQ ('-6 months'))} 
                        {(Id.Lit_Other '+') (Id.Lit_Other '%') (s)}
                      )
                    ]
                  )
              )
            }
          spids: [77]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.AndOr
                  ops: [Id.Op_DPipe]
                  children: [
                    (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$ts'))} {(-lt)} 
                      {(DQ ($ Id.VSub_DollarName '$recent'))} {(Id.Lit_RBracket ']')}
                    )
                    (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$ts'))} {(-gt)} 
                      {(DQ ($ Id.VSub_DollarName '$now'))} {(Id.Lit_RBracket ']')}
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:126)
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:format)
                  op: assign_op.Equal
                  rhs: {(DQ ('+%b %e  %Y'))}
                  spids: [131]
                )
              ]
            )
          ]
          spids: [95 128]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:format)
              op: assign_op.Equal
              rhs: {(DQ ('+%b %e %R'))}
              spids: [139]
            )
          ]
        )
      ]
    )
    (C {(date)} 
      {(--date) (Id.Lit_Equals '=') (DQ ('1970-01-01 UTC ') ($ Id.VSub_DollarName '$ts') (' sec'))} {(DQ ($ Id.VSub_DollarName '$format'))}
    )
  ]
)