Show script or download{:target="_blank"} it.
{% highlight javascript %}
{% include_relative script.js %}
{% endhighlight %}
Sentinel-2 Global Mosaic script is used within S2GM project to select best pixel within the chosen temporal period (10-daily, monthly, quarterly, annual).
Script requires Sentinel Hub API v.2 to run as a whole due to multi-part result. Parts of it can however be used at this point already.