{% set version = "4041.110" %}
{% 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: ce6bf1f52debf118eceea6c5b0a7f4ffb8ea1b75a0d634b3b65b802a0f0c71e7

build:
  number: 0
  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
