Mantid
Loading...
Searching...
No Matches
DateAndTimeHelpers.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
10#include "MantidKernel/DllConfig.h"
11#include <vector>
12
13namespace Mantid {
14namespace Kernel {
15namespace DateAndTimeHelpers {
16
17MANTID_KERNEL_DLL Types::Core::DateAndTime createFromSanitizedISO8601(const std::string &date);
18
19MANTID_KERNEL_DLL std::string verifyAndSanitizeISO8601(const std::string &date, bool displayWarnings = true);
20
21MANTID_KERNEL_DLL Types::Core::DateAndTime averageSorted(const std::vector<Types::Core::DateAndTime> &times);
22
23MANTID_KERNEL_DLL Types::Core::DateAndTime averageSorted(const std::vector<Types::Core::DateAndTime> &times,
24 const std::vector<double> &weights);
25
26} // namespace DateAndTimeHelpers
27} // namespace Kernel
28} // namespace Mantid
MANTID_KERNEL_DLL Types::Core::DateAndTime createFromSanitizedISO8601(const std::string &date)
Creates a DateAndTime object from a date string even if the string does not exactly conform to ISO860...
MANTID_KERNEL_DLL std::string verifyAndSanitizeISO8601(const std::string &date, bool displayWarnings=true)
Verifies whether or not a string conforms to ISO8601.
MANTID_KERNEL_DLL Types::Core::DateAndTime averageSorted(const std::vector< Types::Core::DateAndTime > &times)
averageSorted Assuming that the vector is sorted, find the average time
Helper class which provides the Collimation Length for SANS instruments.