In different bond markets and instruments there are different day count conventions for calculating accrued interest. These day count conventions depend on the location, currency, market and type of instrument.
A day count convention is a fraction with the numerator as 30 or actual number of days to be taken in a month, and the denominator specifying how to assume the number of days in a year.
Once such convention is the 30E/360, also known as the Eurobond basis. In the fraction, the letter E represents that it’s the Eurobond basis.
As you can see, in this day count convention, the denominator is always 360. The numerator is always assumed to be 30, including for February. If the first date falls on the 31st, it is changed to the 30th. If the second date or end date falls on the 31st, it is changed to the 30th.
The following table shows various examples of calculating day count based on 30E/360 convention.