{% set version = "4032.109" %}
{% set posix = 'm2-' if win else '' %}

package:
  name: r-timedate
  version: {{ version|replace("-", "_") }}

source:
  url:
    - {{ cran_mirror }}/src/contrib/timeDate_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/timeDate/timeDate_{{ version }}.tar.gz
  sha256: 402841bda47e8c31f49773de2ff5447e9780bc7c8af5fb18be9287b546fcb958

build:
  number: 1
  noarch: generic
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
  run:
    - r-base

test:
  commands:
    - $R -e "library('timeDate')"           # [not win]
    - "\"%R%\" -e \"library('timeDate')\""  # [win]

about:
  home: https://www.rmetrics.org
  license: GPL-2.0-or-later
  summary: The 'timeDate' class fulfils the conventions of the ISO 8601  standard as well as of the ANSI C and POSIX standards. Beyond these standards it provides the "Financial Center" concept which allows to handle data records collected in different time  zones and mix them up to have always the proper time stamps with  respect
    to your personal financial center, or alternatively to the GMT reference time. It can thus also handle time stamps from historical  data records from the same time zone, even if the financial  centers changed day light saving times at different calendar dates.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

extra:
  recipe-maintainers:
    - conda-forge/r
    - croth1
