Download the PHP package simbiat/sand-clock without Composer

On this page you can find all versions of the php package simbiat/sand-clock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sand-clock

SandClock

Set of functions for working with date/time.

How to use

Time Formatting

will output 2009-02-13 23:31:30.000000

You can format to your liking

to get 23:31

Seconds to time units left

will output 1 aeon 1 millennium 5 centuries 8 decades 5 years 6 months 1 week 1 day 7 hours 10 minutes 52 seconds

You can output the same in 'short' format (without text), for example

will output 1:1:5:8:5:6:1:1:7:10:52

This function is multilingual and at the moment supports 8 languages: Deutsch (de), English (en), Spanish (es), French (fr), Italian (it), Japanese (jp), Russian (ru), Finnish (fi). You can switch it like this:

will output 1 ion 1 sennenki 5 seiki 8 tōnen 5 toshi 6 tsuki 1 shū 1 hi 7 jikan 10 bun 52 byō

You can also pass iso: true in order to generate the output compliant with ISO 8601 duration format like P51Y8M0W4DT8H20M31S

Timezone conversion

If you want to convert timezone of a timestamp presented as integer, string, \DateTime or \DateTimeImmutable you can make a call like this:

This will return a respective \DateTime object, which you can then manipulate further. If you originally provide a \DateTime or \DateTimeImmutable object, you can use null for $from (2nd argument), since it will not be used in this case (empty string will throw an exception).


All versions of sand-clock with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-mbstring Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package simbiat/sand-clock contains the following files

Loading the files please wait ....