File Exchange

image thumbnail

DST-function

version 1.0 (2.49 KB) by

Find hours in anyday, and correction term on order to correct to normalized time.

2 Downloads

Updated

View License

Function that take datevalue/datevector as argument, and return number of hours for each day.

The user can also give datevalues that correspond to hourly values, and get at correction term in order to correct hour values in DST-format to normalized time.

Comments and Ratings (2)

If you give in a date and set correction = 0 then you get the number of hours in that day. On the day when adjusting the clock forward it will give 23 as output and 25 when we adjust the clock backward.

I correction = 1 and you give in a vector of datevalues that also contain hour informastion, then you will get -1 during the hours which is part of what we call summertime in Norway. This vector can you then subtract from the time value given in, and then you get all timevalues are in normalized time. The last functionality is ment to be used when working towards databases which operate in normalized time, that is not taking into account daylight saving time.

Hi, Gunnar. Perhaps it's a language thing, but I find your description very obscure--could you please provide some examples of what it does? Thanks!

MATLAB Release
MATLAB 7.13 (R2011b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video