Code covered by the BSD License  

Highlights from
DST-function

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 2.49 KB File ID: #35212

DST-function

by

 

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

| Watch this File

File Information
Description

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.

MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
06 Jun 2012 Gunnar Aronsen

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.

05 Jun 2012 David Goldsmith

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!

Contact us